mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-21 11:35:53 +00:00
Change typedef to using.
Conflicts: src/ripple/app/TODO.md src/ripple/app/ledger/Ledger.h src/ripple/protocol/Protocol.h
This commit is contained in:
committed by
Vinnie Falco
parent
52f298f150
commit
155fcdbcd0
@@ -325,8 +325,8 @@ public:
|
|||||||
zeromem (data, sizeof (ElementType) * numElements);
|
zeromem (data, sizeof (ElementType) * numElements);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** This typedef can be used to get the type of the heapblock's elements. */
|
/** This type alias can be used to get the type of the heapblock's elements. */
|
||||||
typedef ElementType Type;
|
using Type = ElementType;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ template <class DeducedHandler, class... Args>
|
|||||||
class bound_handler
|
class bound_handler
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
typedef std::tuple <std::decay_t <Args>...> args_type;
|
using args_type = std::tuple <std::decay_t <Args>...>;
|
||||||
|
|
||||||
std::decay_t <DeducedHandler> m_handler;
|
std::decay_t <DeducedHandler> m_handler;
|
||||||
args_type m_args;
|
args_type m_args;
|
||||||
@@ -54,7 +54,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef void result_type;
|
using result_type = void;
|
||||||
|
|
||||||
explicit
|
explicit
|
||||||
bound_handler (DeducedHandler&& handler, Args&&... args)
|
bound_handler (DeducedHandler&& handler, Args&&... args)
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ template <class Clock>
|
|||||||
class io_latency_probe
|
class io_latency_probe
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
typedef typename Clock::duration duration;
|
using duration = typename Clock::duration;
|
||||||
typedef typename Clock::time_point time_point;
|
using time_point = typename Clock::time_point;
|
||||||
|
|
||||||
std::recursive_mutex m_mutex;
|
std::recursive_mutex m_mutex;
|
||||||
std::condition_variable_any m_cond;
|
std::condition_variable_any m_cond;
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ namespace beast {
|
|||||||
// use boost, and then switch to std::error_code when
|
// use boost, and then switch to std::error_code when
|
||||||
// it is available on all our supported platforms.
|
// it is available on all our supported platforms.
|
||||||
//
|
//
|
||||||
typedef boost::system::error_code ErrorCode;
|
using ErrorCode = boost::system::error_code;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ public:
|
|||||||
you can use this to declare a type that is guaranteed to
|
you can use this to declare a type that is guaranteed to
|
||||||
work cleanly.
|
work cleanly.
|
||||||
*/
|
*/
|
||||||
typedef double value_type;
|
using value_type = double;
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
/** Creates a RelativeTime.
|
/** Creates a RelativeTime.
|
||||||
|
|||||||
@@ -39,13 +39,13 @@ template <class T, class U,
|
|||||||
bool = std::is_const <std::remove_reference_t <T>>::value>
|
bool = std::is_const <std::remove_reference_t <T>>::value>
|
||||||
struct apply_const
|
struct apply_const
|
||||||
{
|
{
|
||||||
typedef U type;
|
using type = U;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T, class U>
|
template <class T, class U>
|
||||||
struct apply_const <T, U, true>
|
struct apply_const <T, U, true>
|
||||||
{
|
{
|
||||||
typedef const U type;
|
using type = const U;
|
||||||
};
|
};
|
||||||
|
|
||||||
// is_contiguous is true if C is a contiguous container
|
// is_contiguous is true if C is a contiguous container
|
||||||
@@ -161,7 +161,7 @@ private:
|
|||||||
void
|
void
|
||||||
assign (Iter first, Iter last) noexcept
|
assign (Iter first, Iter last) noexcept
|
||||||
{
|
{
|
||||||
typedef typename std::iterator_traits <Iter>::value_type U;
|
using U = typename std::iterator_traits <Iter>::value_type;
|
||||||
|
|
||||||
static_assert (detail::buffer_view_const_compatible <T, U>::value,
|
static_assert (detail::buffer_view_const_compatible <T, U>::value,
|
||||||
"Cannot convert from 'U const' to 'T', "
|
"Cannot convert from 'U const' to 'T', "
|
||||||
@@ -190,17 +190,17 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef T value_type;
|
using value_type = T;
|
||||||
typedef std::size_t size_type;
|
using size_type = std::size_t;
|
||||||
typedef std::ptrdiff_t difference_type;
|
using difference_type = std::ptrdiff_t;
|
||||||
typedef T& reference;
|
using reference = T&;
|
||||||
typedef T const& const_reference;
|
using const_reference = T const&;
|
||||||
typedef T* pointer;
|
using pointer = T*;
|
||||||
typedef T const* const_pointer;
|
using const_pointer = T const*;
|
||||||
typedef T* iterator;
|
using iterator = T*;
|
||||||
typedef T const* const_iterator;
|
using const_iterator = T const*;
|
||||||
typedef std::reverse_iterator <iterator> reverse_iterator;
|
using reverse_iterator = std::reverse_iterator <iterator>;
|
||||||
typedef std::reverse_iterator <const_iterator> const_reverse_iterator;
|
using const_reverse_iterator = std::reverse_iterator <const_iterator>;
|
||||||
|
|
||||||
// default construct
|
// default construct
|
||||||
buffer_view () noexcept
|
buffer_view () noexcept
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ template <class Container>
|
|||||||
class const_container
|
class const_container
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
typedef Container cont_type;
|
using cont_type = Container;
|
||||||
|
|
||||||
cont_type m_cont;
|
cont_type m_cont;
|
||||||
|
|
||||||
@@ -46,11 +46,11 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef typename cont_type::value_type value_type;
|
using value_type = typename cont_type::value_type;
|
||||||
typedef typename cont_type::size_type size_type;
|
using size_type = typename cont_type::size_type;
|
||||||
typedef typename cont_type::difference_type difference_type;
|
using difference_type = typename cont_type::difference_type;
|
||||||
typedef typename cont_type::const_iterator iterator;
|
using iterator = typename cont_type::const_iterator;
|
||||||
typedef typename cont_type::const_iterator const_iterator;
|
using const_iterator = typename cont_type::const_iterator;
|
||||||
|
|
||||||
/** Returns `true` if the container is empty. */
|
/** Returns `true` if the container is empty. */
|
||||||
bool
|
bool
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ struct cyclic_iterator_category<
|
|||||||
std::forward_iterator_tag
|
std::forward_iterator_tag
|
||||||
>
|
>
|
||||||
{
|
{
|
||||||
typedef std::forward_iterator_tag type;
|
using type = std::forward_iterator_tag;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
@@ -69,7 +69,7 @@ struct cyclic_iterator_category<
|
|||||||
std::bidirectional_iterator_tag
|
std::bidirectional_iterator_tag
|
||||||
>
|
>
|
||||||
{
|
{
|
||||||
typedef std::bidirectional_iterator_tag type;
|
using type = std::bidirectional_iterator_tag;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
@@ -77,7 +77,7 @@ struct cyclic_iterator_category<
|
|||||||
std::random_access_iterator_tag
|
std::random_access_iterator_tag
|
||||||
>
|
>
|
||||||
{
|
{
|
||||||
typedef std::bidirectional_iterator_tag type;
|
using type = std::bidirectional_iterator_tag;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -94,7 +94,7 @@ template<
|
|||||||
>
|
>
|
||||||
struct cyclic_iterator_base
|
struct cyclic_iterator_base
|
||||||
{
|
{
|
||||||
typedef boost::iterator_facade<
|
using type = boost::iterator_facade<
|
||||||
cyclic_iterator<
|
cyclic_iterator<
|
||||||
ContainerIterator
|
ContainerIterator
|
||||||
>,
|
>,
|
||||||
@@ -109,7 +109,7 @@ struct cyclic_iterator_base
|
|||||||
typename std::iterator_traits<
|
typename std::iterator_traits<
|
||||||
ContainerIterator
|
ContainerIterator
|
||||||
>::reference
|
>::reference
|
||||||
> type;
|
>;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -153,39 +153,39 @@ public:
|
|||||||
/**
|
/**
|
||||||
\brief The base type which is a <code>boost::iterator_facade</code>
|
\brief The base type which is a <code>boost::iterator_facade</code>
|
||||||
*/
|
*/
|
||||||
typedef typename detail::cyclic_iterator_base<
|
using base_type = typename detail::cyclic_iterator_base<
|
||||||
ContainerIterator
|
ContainerIterator
|
||||||
>::type base_type;
|
>::type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief The underlying iterator type
|
\brief The underlying iterator type
|
||||||
*/
|
*/
|
||||||
typedef ContainerIterator container_iterator_type;
|
using container_iterator_type = ContainerIterator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief The value type adapted from \a ContainerIterator
|
\brief The value type adapted from \a ContainerIterator
|
||||||
*/
|
*/
|
||||||
typedef typename base_type::value_type value_type;
|
using value_type = typename base_type::value_type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief The reference type adapted from \a ContainerIterator
|
\brief The reference type adapted from \a ContainerIterator
|
||||||
*/
|
*/
|
||||||
typedef typename base_type::reference reference;
|
using reference = typename base_type::reference;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief The pointer type adapted from \a ContainerIterator
|
\brief The pointer type adapted from \a ContainerIterator
|
||||||
*/
|
*/
|
||||||
typedef typename base_type::pointer pointer;
|
using pointer = typename base_type::pointer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief The difference type adapted from \a ContainerIterator
|
\brief The difference type adapted from \a ContainerIterator
|
||||||
*/
|
*/
|
||||||
typedef typename base_type::difference_type difference_type;
|
using difference_type = typename base_type::difference_type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief The iterator category, either Forward or Bidirectional
|
\brief The iterator category, either Forward or Bidirectional
|
||||||
*/
|
*/
|
||||||
typedef typename base_type::iterator_category iterator_category;
|
using iterator_category = typename base_type::iterator_category;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Creates a singular iterator
|
\brief Creates a singular iterator
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
using list_type = typename boost::intrusive::make_list <element,
|
using list_type = typename boost::intrusive::make_list <element,
|
||||||
boost::intrusive::constant_time_size <false>>::type ;
|
boost::intrusive::constant_time_size <false>>::type;
|
||||||
|
|
||||||
using cont_type = typename std::conditional <
|
using cont_type = typename std::conditional <
|
||||||
IsMulti,
|
IsMulti,
|
||||||
|
|||||||
@@ -113,14 +113,14 @@ public:
|
|||||||
template <class T>
|
template <class T>
|
||||||
struct AllocT
|
struct AllocT
|
||||||
{
|
{
|
||||||
typedef T value_type;
|
using value_type = T;
|
||||||
|
|
||||||
//typedef propagate_on_container_swap : std::true_type::type;
|
//using std::true_type::type = propagate_on_container_swap :;
|
||||||
|
|
||||||
template <class U>
|
template <class U>
|
||||||
struct rebind
|
struct rebind
|
||||||
{
|
{
|
||||||
typedef AllocT <U> other;
|
using other = AllocT <U>;
|
||||||
};
|
};
|
||||||
|
|
||||||
explicit AllocT (int)
|
explicit AllocT (int)
|
||||||
@@ -170,8 +170,8 @@ public:
|
|||||||
class MaybeUnordered : public Base
|
class MaybeUnordered : public Base
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::less <typename Base::Key> Comp;
|
using Comp = std::less <typename Base::Key>;
|
||||||
typedef CompT <typename Base::Key> MyComp;
|
using MyComp = CompT <typename Base::Key>;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static std::string name_ordered_part()
|
static std::string name_ordered_part()
|
||||||
@@ -185,10 +185,10 @@ public:
|
|||||||
class MaybeUnordered <Base, true> : public Base
|
class MaybeUnordered <Base, true> : public Base
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::hash <typename Base::Key> Hash;
|
using Hash = std::hash <typename Base::Key>;
|
||||||
typedef std::equal_to <typename Base::Key> Equal;
|
using Equal = std::equal_to <typename Base::Key>;
|
||||||
typedef HashT <typename Base::Key> MyHash;
|
using MyHash = HashT <typename Base::Key>;
|
||||||
typedef EqualT <typename Base::Key> MyEqual;
|
using MyEqual = EqualT <typename Base::Key>;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static std::string name_ordered_part()
|
static std::string name_ordered_part()
|
||||||
@@ -226,9 +226,9 @@ public:
|
|||||||
class MaybeMap : public Base
|
class MaybeMap : public Base
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef void T;
|
using T = void;
|
||||||
typedef typename Base::Key Value;
|
using Value = typename Base::Key;
|
||||||
typedef std::vector <Value> Values;
|
using Values = std::vector <Value>;
|
||||||
|
|
||||||
static typename Base::Key const& extract (Value const& value)
|
static typename Base::Key const& extract (Value const& value)
|
||||||
{
|
{
|
||||||
@@ -259,9 +259,9 @@ public:
|
|||||||
class MaybeMap <Base, true> : public Base
|
class MaybeMap <Base, true> : public Base
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef int T;
|
using T = int;
|
||||||
typedef std::pair <typename Base::Key, T> Value;
|
using Value = std::pair <typename Base::Key, T>;
|
||||||
typedef std::vector <Value> Values;
|
using Values = std::vector <Value>;
|
||||||
|
|
||||||
static typename Base::Key const& extract (Value const& value)
|
static typename Base::Key const& extract (Value const& value)
|
||||||
{
|
{
|
||||||
@@ -326,9 +326,9 @@ public:
|
|||||||
|
|
||||||
struct TestTraitsBase
|
struct TestTraitsBase
|
||||||
{
|
{
|
||||||
typedef std::string Key;
|
using Key = std::string;
|
||||||
typedef std::chrono::steady_clock Clock;
|
using Clock = std::chrono::steady_clock;
|
||||||
typedef manual_clock<Clock> ManualClock;
|
using ManualClock = manual_clock<Clock>;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <bool IsUnordered, bool IsMulti, bool IsMap>
|
template <bool IsUnordered, bool IsMulti, bool IsMap>
|
||||||
@@ -337,18 +337,18 @@ public:
|
|||||||
TestTraitsBase, IsMap>, IsMulti>, IsUnordered>
|
TestTraitsBase, IsMap>, IsMulti>, IsUnordered>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
typedef MaybeUnordered <MaybeMulti <MaybeMap <
|
using Base = MaybeUnordered <MaybeMulti <MaybeMap <
|
||||||
TestTraitsBase, IsMap>, IsMulti>, IsUnordered> Base;
|
TestTraitsBase, IsMap>, IsMulti>, IsUnordered>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
using typename Base::Key;
|
using typename Base::Key;
|
||||||
|
|
||||||
typedef std::integral_constant <bool, IsUnordered> is_unordered;
|
using is_unordered = std::integral_constant <bool, IsUnordered>;
|
||||||
typedef std::integral_constant <bool, IsMulti> is_multi;
|
using is_multi = std::integral_constant <bool, IsMulti>;
|
||||||
typedef std::integral_constant <bool, IsMap> is_map;
|
using is_map = std::integral_constant <bool, IsMap>;
|
||||||
|
|
||||||
typedef std::allocator <typename Base::Value> Alloc;
|
using Alloc = std::allocator <typename Base::Value>;
|
||||||
typedef AllocT <typename Base::Value> MyAlloc;
|
using MyAlloc = AllocT <typename Base::Value>;
|
||||||
|
|
||||||
static std::string name()
|
static std::string name()
|
||||||
{
|
{
|
||||||
@@ -645,13 +645,13 @@ typename std::enable_if <
|
|||||||
aged_associative_container_test_base::
|
aged_associative_container_test_base::
|
||||||
checkUnorderedContentsRefRef (C&& c, Values const& v)
|
checkUnorderedContentsRefRef (C&& c, Values const& v)
|
||||||
{
|
{
|
||||||
typedef typename std::remove_reference <C>::type Cont;
|
using Cont = typename std::remove_reference <C>::type;
|
||||||
typedef TestTraits <
|
using Traits = TestTraits <
|
||||||
Cont::is_unordered::value,
|
Cont::is_unordered::value,
|
||||||
Cont::is_multi::value,
|
Cont::is_multi::value,
|
||||||
Cont::is_map::value
|
Cont::is_map::value
|
||||||
> Traits;
|
>;
|
||||||
typedef typename Cont::size_type size_type;
|
using size_type = typename Cont::size_type;
|
||||||
auto const hash (c.hash_function());
|
auto const hash (c.hash_function());
|
||||||
auto const key_eq (c.key_eq());
|
auto const key_eq (c.key_eq());
|
||||||
for (size_type i (0); i < c.bucket_count(); ++i)
|
for (size_type i (0); i < c.bucket_count(); ++i)
|
||||||
@@ -679,13 +679,13 @@ void
|
|||||||
aged_associative_container_test_base::
|
aged_associative_container_test_base::
|
||||||
checkContentsRefRef (C&& c, Values const& v)
|
checkContentsRefRef (C&& c, Values const& v)
|
||||||
{
|
{
|
||||||
typedef typename std::remove_reference <C>::type Cont;
|
using Cont = typename std::remove_reference <C>::type;
|
||||||
typedef TestTraits <
|
using Traits = TestTraits <
|
||||||
Cont::is_unordered::value,
|
Cont::is_unordered::value,
|
||||||
Cont::is_multi::value,
|
Cont::is_multi::value,
|
||||||
Cont::is_map::value
|
Cont::is_map::value
|
||||||
> Traits;
|
>;
|
||||||
typedef typename Cont::size_type size_type;
|
using size_type = typename Cont::size_type;
|
||||||
|
|
||||||
expect (c.size() == v.size());
|
expect (c.size() == v.size());
|
||||||
expect (size_type (std::distance (
|
expect (size_type (std::distance (
|
||||||
@@ -719,12 +719,12 @@ void
|
|||||||
aged_associative_container_test_base::
|
aged_associative_container_test_base::
|
||||||
checkContents (Cont& c)
|
checkContents (Cont& c)
|
||||||
{
|
{
|
||||||
typedef TestTraits <
|
using Traits = TestTraits <
|
||||||
Cont::is_unordered::value,
|
Cont::is_unordered::value,
|
||||||
Cont::is_multi::value,
|
Cont::is_multi::value,
|
||||||
Cont::is_map::value
|
Cont::is_map::value
|
||||||
> Traits;
|
>;
|
||||||
typedef typename Traits::Values Values;
|
using Values = typename Traits::Values;
|
||||||
checkContents (c, Values());
|
checkContents (c, Values());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -740,15 +740,15 @@ typename std::enable_if <! IsUnordered>::type
|
|||||||
aged_associative_container_test_base::
|
aged_associative_container_test_base::
|
||||||
testConstructEmpty ()
|
testConstructEmpty ()
|
||||||
{
|
{
|
||||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||||
typedef typename Traits::Value Value;
|
using Value = typename Traits::Value;
|
||||||
typedef typename Traits::Key Key;
|
using Key = typename Traits::Key;
|
||||||
typedef typename Traits::T T;
|
using T = typename Traits::T;
|
||||||
typedef typename Traits::Clock Clock;
|
using Clock = typename Traits::Clock;
|
||||||
typedef typename Traits::Comp Comp;
|
using Comp = typename Traits::Comp;
|
||||||
typedef typename Traits::Alloc Alloc;
|
using Alloc = typename Traits::Alloc;
|
||||||
typedef typename Traits::MyComp MyComp;
|
using MyComp = typename Traits::MyComp;
|
||||||
typedef typename Traits::MyAlloc MyAlloc;
|
using MyAlloc = typename Traits::MyAlloc;
|
||||||
typename Traits::ManualClock clock;
|
typename Traits::ManualClock clock;
|
||||||
|
|
||||||
//testcase (Traits::name() + " empty");
|
//testcase (Traits::name() + " empty");
|
||||||
@@ -785,17 +785,17 @@ typename std::enable_if <IsUnordered>::type
|
|||||||
aged_associative_container_test_base::
|
aged_associative_container_test_base::
|
||||||
testConstructEmpty ()
|
testConstructEmpty ()
|
||||||
{
|
{
|
||||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||||
typedef typename Traits::Value Value;
|
using Value = typename Traits::Value;
|
||||||
typedef typename Traits::Key Key;
|
using Key = typename Traits::Key;
|
||||||
typedef typename Traits::T T;
|
using T = typename Traits::T;
|
||||||
typedef typename Traits::Clock Clock;
|
using Clock = typename Traits::Clock;
|
||||||
typedef typename Traits::Hash Hash;
|
using Hash = typename Traits::Hash;
|
||||||
typedef typename Traits::Equal Equal;
|
using Equal = typename Traits::Equal;
|
||||||
typedef typename Traits::Alloc Alloc;
|
using Alloc = typename Traits::Alloc;
|
||||||
typedef typename Traits::MyHash MyHash;
|
using MyHash = typename Traits::MyHash;
|
||||||
typedef typename Traits::MyEqual MyEqual;
|
using MyEqual = typename Traits::MyEqual;
|
||||||
typedef typename Traits::MyAlloc MyAlloc;
|
using MyAlloc = typename Traits::MyAlloc;
|
||||||
typename Traits::ManualClock clock;
|
typename Traits::ManualClock clock;
|
||||||
|
|
||||||
//testcase (Traits::name() + " empty");
|
//testcase (Traits::name() + " empty");
|
||||||
@@ -855,15 +855,15 @@ typename std::enable_if <! IsUnordered>::type
|
|||||||
aged_associative_container_test_base::
|
aged_associative_container_test_base::
|
||||||
testConstructRange ()
|
testConstructRange ()
|
||||||
{
|
{
|
||||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||||
typedef typename Traits::Value Value;
|
using Value = typename Traits::Value;
|
||||||
typedef typename Traits::Key Key;
|
using Key = typename Traits::Key;
|
||||||
typedef typename Traits::T T;
|
using T = typename Traits::T;
|
||||||
typedef typename Traits::Clock Clock;
|
using Clock = typename Traits::Clock;
|
||||||
typedef typename Traits::Comp Comp;
|
using Comp = typename Traits::Comp;
|
||||||
typedef typename Traits::Alloc Alloc;
|
using Alloc = typename Traits::Alloc;
|
||||||
typedef typename Traits::MyComp MyComp;
|
using MyComp = typename Traits::MyComp;
|
||||||
typedef typename Traits::MyAlloc MyAlloc;
|
using MyAlloc = typename Traits::MyAlloc;
|
||||||
typename Traits::ManualClock clock;
|
typename Traits::ManualClock clock;
|
||||||
auto const v (Traits::values());
|
auto const v (Traits::values());
|
||||||
|
|
||||||
@@ -918,17 +918,17 @@ typename std::enable_if <IsUnordered>::type
|
|||||||
aged_associative_container_test_base::
|
aged_associative_container_test_base::
|
||||||
testConstructRange ()
|
testConstructRange ()
|
||||||
{
|
{
|
||||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||||
typedef typename Traits::Value Value;
|
using Value = typename Traits::Value;
|
||||||
typedef typename Traits::Key Key;
|
using Key = typename Traits::Key;
|
||||||
typedef typename Traits::T T;
|
using T = typename Traits::T;
|
||||||
typedef typename Traits::Clock Clock;
|
using Clock = typename Traits::Clock;
|
||||||
typedef typename Traits::Hash Hash;
|
using Hash = typename Traits::Hash;
|
||||||
typedef typename Traits::Equal Equal;
|
using Equal = typename Traits::Equal;
|
||||||
typedef typename Traits::Alloc Alloc;
|
using Alloc = typename Traits::Alloc;
|
||||||
typedef typename Traits::MyHash MyHash;
|
using MyHash = typename Traits::MyHash;
|
||||||
typedef typename Traits::MyEqual MyEqual;
|
using MyEqual = typename Traits::MyEqual;
|
||||||
typedef typename Traits::MyAlloc MyAlloc;
|
using MyAlloc = typename Traits::MyAlloc;
|
||||||
typename Traits::ManualClock clock;
|
typename Traits::ManualClock clock;
|
||||||
auto const v (Traits::values());
|
auto const v (Traits::values());
|
||||||
|
|
||||||
@@ -998,15 +998,15 @@ typename std::enable_if <! IsUnordered>::type
|
|||||||
aged_associative_container_test_base::
|
aged_associative_container_test_base::
|
||||||
testConstructInitList ()
|
testConstructInitList ()
|
||||||
{
|
{
|
||||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||||
typedef typename Traits::Value Value;
|
using Value = typename Traits::Value;
|
||||||
typedef typename Traits::Key Key;
|
using Key = typename Traits::Key;
|
||||||
typedef typename Traits::T T;
|
using T = typename Traits::T;
|
||||||
typedef typename Traits::Clock Clock;
|
using Clock = typename Traits::Clock;
|
||||||
typedef typename Traits::Comp Comp;
|
using Comp = typename Traits::Comp;
|
||||||
typedef typename Traits::Alloc Alloc;
|
using Alloc = typename Traits::Alloc;
|
||||||
typedef typename Traits::MyComp MyComp;
|
using MyComp = typename Traits::MyComp;
|
||||||
typedef typename Traits::MyAlloc MyAlloc;
|
using MyAlloc = typename Traits::MyAlloc;
|
||||||
typename Traits::ManualClock clock;
|
typename Traits::ManualClock clock;
|
||||||
|
|
||||||
//testcase (Traits::name() + " init-list");
|
//testcase (Traits::name() + " init-list");
|
||||||
@@ -1023,17 +1023,17 @@ typename std::enable_if <IsUnordered>::type
|
|||||||
aged_associative_container_test_base::
|
aged_associative_container_test_base::
|
||||||
testConstructInitList ()
|
testConstructInitList ()
|
||||||
{
|
{
|
||||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||||
typedef typename Traits::Value Value;
|
using Value = typename Traits::Value;
|
||||||
typedef typename Traits::Key Key;
|
using Key = typename Traits::Key;
|
||||||
typedef typename Traits::T T;
|
using T = typename Traits::T;
|
||||||
typedef typename Traits::Clock Clock;
|
using Clock = typename Traits::Clock;
|
||||||
typedef typename Traits::Hash Hash;
|
using Hash = typename Traits::Hash;
|
||||||
typedef typename Traits::Equal Equal;
|
using Equal = typename Traits::Equal;
|
||||||
typedef typename Traits::Alloc Alloc;
|
using Alloc = typename Traits::Alloc;
|
||||||
typedef typename Traits::MyHash MyHash;
|
using MyHash = typename Traits::MyHash;
|
||||||
typedef typename Traits::MyEqual MyEqual;
|
using MyEqual = typename Traits::MyEqual;
|
||||||
typedef typename Traits::MyAlloc MyAlloc;
|
using MyAlloc = typename Traits::MyAlloc;
|
||||||
typename Traits::ManualClock clock;
|
typename Traits::ManualClock clock;
|
||||||
|
|
||||||
//testcase (Traits::name() + " init-list");
|
//testcase (Traits::name() + " init-list");
|
||||||
@@ -1054,9 +1054,9 @@ void
|
|||||||
aged_associative_container_test_base::
|
aged_associative_container_test_base::
|
||||||
testCopyMove ()
|
testCopyMove ()
|
||||||
{
|
{
|
||||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||||
typedef typename Traits::Value Value;
|
using Value = typename Traits::Value;
|
||||||
typedef typename Traits::Alloc Alloc;
|
using Alloc = typename Traits::Alloc;
|
||||||
typename Traits::ManualClock clock;
|
typename Traits::ManualClock clock;
|
||||||
auto const v (Traits::values());
|
auto const v (Traits::values());
|
||||||
|
|
||||||
@@ -1136,9 +1136,9 @@ void
|
|||||||
aged_associative_container_test_base::
|
aged_associative_container_test_base::
|
||||||
testIterator()
|
testIterator()
|
||||||
{
|
{
|
||||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||||
typedef typename Traits::Value Value;
|
using Value = typename Traits::Value;
|
||||||
typedef typename Traits::Alloc Alloc;
|
using Alloc = typename Traits::Alloc;
|
||||||
typename Traits::ManualClock clock;
|
typename Traits::ManualClock clock;
|
||||||
auto const v (Traits::values());
|
auto const v (Traits::values());
|
||||||
|
|
||||||
@@ -1199,9 +1199,9 @@ typename std::enable_if <! IsUnordered>::type
|
|||||||
aged_associative_container_test_base::
|
aged_associative_container_test_base::
|
||||||
testReverseIterator()
|
testReverseIterator()
|
||||||
{
|
{
|
||||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||||
typedef typename Traits::Value Value;
|
using Value = typename Traits::Value;
|
||||||
typedef typename Traits::Alloc Alloc;
|
using Alloc = typename Traits::Alloc;
|
||||||
typename Traits::ManualClock clock;
|
typename Traits::ManualClock clock;
|
||||||
auto const v (Traits::values());
|
auto const v (Traits::values());
|
||||||
|
|
||||||
@@ -1356,7 +1356,7 @@ void
|
|||||||
aged_associative_container_test_base::
|
aged_associative_container_test_base::
|
||||||
testModifiers()
|
testModifiers()
|
||||||
{
|
{
|
||||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||||
typename Traits::ManualClock clock;
|
typename Traits::ManualClock clock;
|
||||||
auto const v (Traits::values());
|
auto const v (Traits::values());
|
||||||
auto const l (make_list (v));
|
auto const l (make_list (v));
|
||||||
@@ -1416,8 +1416,8 @@ void
|
|||||||
aged_associative_container_test_base::
|
aged_associative_container_test_base::
|
||||||
testChronological ()
|
testChronological ()
|
||||||
{
|
{
|
||||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||||
typedef typename Traits::Value Value;
|
using Value = typename Traits::Value;
|
||||||
typename Traits::ManualClock clock;
|
typename Traits::ManualClock clock;
|
||||||
auto const v (Traits::values());
|
auto const v (Traits::values());
|
||||||
|
|
||||||
@@ -1483,7 +1483,7 @@ typename std::enable_if <IsMap && ! IsMulti>::type
|
|||||||
aged_associative_container_test_base::
|
aged_associative_container_test_base::
|
||||||
testArrayCreate()
|
testArrayCreate()
|
||||||
{
|
{
|
||||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||||
typename Traits::ManualClock clock;
|
typename Traits::ManualClock clock;
|
||||||
auto v (Traits::values());
|
auto v (Traits::values());
|
||||||
|
|
||||||
@@ -1523,7 +1523,7 @@ reverseFillAgedContainer (Container& c, Values const& values)
|
|||||||
|
|
||||||
// c.clock() returns an abstract_clock, so dynamic_cast to manual_clock.
|
// c.clock() returns an abstract_clock, so dynamic_cast to manual_clock.
|
||||||
// VFALCO NOTE This is sketchy
|
// VFALCO NOTE This is sketchy
|
||||||
typedef TestTraitsBase::ManualClock ManualClock;
|
using ManualClock = TestTraitsBase::ManualClock;
|
||||||
ManualClock& clk (dynamic_cast <ManualClock&> (c.clock()));
|
ManualClock& clk (dynamic_cast <ManualClock&> (c.clock()));
|
||||||
clk.set (0);
|
clk.set (0);
|
||||||
|
|
||||||
@@ -1621,7 +1621,7 @@ void
|
|||||||
aged_associative_container_test_base::
|
aged_associative_container_test_base::
|
||||||
testElementErase ()
|
testElementErase ()
|
||||||
{
|
{
|
||||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||||
|
|
||||||
//testcase (Traits::name() + " element erase"
|
//testcase (Traits::name() + " element erase"
|
||||||
testcase ("element erase");
|
testcase ("element erase");
|
||||||
@@ -1751,7 +1751,7 @@ void
|
|||||||
aged_associative_container_test_base::
|
aged_associative_container_test_base::
|
||||||
testRangeErase ()
|
testRangeErase ()
|
||||||
{
|
{
|
||||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||||
|
|
||||||
//testcase (Traits::name() + " element erase"
|
//testcase (Traits::name() + " element erase"
|
||||||
testcase ("range erase");
|
testcase ("range erase");
|
||||||
@@ -1784,8 +1784,8 @@ typename std::enable_if <! IsUnordered>::type
|
|||||||
aged_associative_container_test_base::
|
aged_associative_container_test_base::
|
||||||
testCompare ()
|
testCompare ()
|
||||||
{
|
{
|
||||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||||
typedef typename Traits::Value Value;
|
using Value = typename Traits::Value;
|
||||||
typename Traits::ManualClock clock;
|
typename Traits::ManualClock clock;
|
||||||
auto const v (Traits::values());
|
auto const v (Traits::values());
|
||||||
|
|
||||||
@@ -1819,7 +1819,7 @@ typename std::enable_if <! IsUnordered>::type
|
|||||||
aged_associative_container_test_base::
|
aged_associative_container_test_base::
|
||||||
testObservers()
|
testObservers()
|
||||||
{
|
{
|
||||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||||
typename Traits::ManualClock clock;
|
typename Traits::ManualClock clock;
|
||||||
|
|
||||||
//testcase (Traits::name() + " observers");
|
//testcase (Traits::name() + " observers");
|
||||||
@@ -1838,7 +1838,7 @@ typename std::enable_if <IsUnordered>::type
|
|||||||
aged_associative_container_test_base::
|
aged_associative_container_test_base::
|
||||||
testObservers()
|
testObservers()
|
||||||
{
|
{
|
||||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||||
typename Traits::ManualClock clock;
|
typename Traits::ManualClock clock;
|
||||||
|
|
||||||
//testcase (Traits::name() + " observers");
|
//testcase (Traits::name() + " observers");
|
||||||
@@ -1862,7 +1862,7 @@ void
|
|||||||
aged_associative_container_test_base::
|
aged_associative_container_test_base::
|
||||||
testMaybeUnorderedMultiMap ()
|
testMaybeUnorderedMultiMap ()
|
||||||
{
|
{
|
||||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||||
|
|
||||||
testConstructEmpty <IsUnordered, IsMulti, IsMap> ();
|
testConstructEmpty <IsUnordered, IsMulti, IsMap> ();
|
||||||
testConstructRange <IsUnordered, IsMulti, IsMap> ();
|
testConstructRange <IsUnordered, IsMulti, IsMap> ();
|
||||||
@@ -1886,8 +1886,8 @@ class aged_set_test : public aged_associative_container_test_base
|
|||||||
public:
|
public:
|
||||||
// Compile time checks
|
// Compile time checks
|
||||||
|
|
||||||
typedef std::string Key;
|
using Key = std::string;
|
||||||
typedef int T;
|
using T = int;
|
||||||
|
|
||||||
static_assert (std::is_same <
|
static_assert (std::is_same <
|
||||||
aged_set <Key>,
|
aged_set <Key>,
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ enum
|
|||||||
};
|
};
|
||||||
|
|
||||||
/** A container suitable for holding the resulting hash. */
|
/** A container suitable for holding the resulting hash. */
|
||||||
typedef std::array <std::uint8_t, digestLength> digest_type;
|
using digest_type = std::array <std::uint8_t, digestLength>;
|
||||||
|
|
||||||
namespace detail {
|
namespace detail {
|
||||||
struct Context
|
struct Context
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ template <>
|
|||||||
struct equal_to <void>
|
struct equal_to <void>
|
||||||
{
|
{
|
||||||
// VFALCO NOTE Its not clear how to support is_transparent pre c++14
|
// VFALCO NOTE Its not clear how to support is_transparent pre c++14
|
||||||
typedef std::true_type is_transparent;
|
using is_transparent = std::true_type;
|
||||||
|
|
||||||
template <class T, class U>
|
template <class T, class U>
|
||||||
auto operator() (T&& lhs, U&& rhs) const ->
|
auto operator() (T&& lhs, U&& rhs) const ->
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ namespace std {
|
|||||||
template <class T, T... Ints>
|
template <class T, T... Ints>
|
||||||
struct integer_sequence
|
struct integer_sequence
|
||||||
{
|
{
|
||||||
typedef T value_type;
|
using value_type = T;
|
||||||
static_assert (is_integral<T>::value,
|
static_assert (is_integral<T>::value,
|
||||||
"std::integer_sequence can only be instantiated with an integral type" );
|
"std::integer_sequence can only be instantiated with an integral type" );
|
||||||
|
|
||||||
@@ -70,15 +70,15 @@ template <class T, unsigned long long N, unsigned long long ...Indices>
|
|||||||
struct make_integer_sequence_unchecked <
|
struct make_integer_sequence_unchecked <
|
||||||
T, N, integer_sequence <T, Indices...>>
|
T, N, integer_sequence <T, Indices...>>
|
||||||
{
|
{
|
||||||
typedef typename make_integer_sequence_unchecked<
|
using type = typename make_integer_sequence_unchecked<
|
||||||
T, N-1, integer_sequence<T, N-1, Indices...>>::type type;
|
T, N-1, integer_sequence<T, N-1, Indices...>>::type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T, unsigned long long ...Indices>
|
template <class T, unsigned long long ...Indices>
|
||||||
struct make_integer_sequence_unchecked <
|
struct make_integer_sequence_unchecked <
|
||||||
T, 0, integer_sequence<T, Indices...>>
|
T, 0, integer_sequence<T, Indices...>>
|
||||||
{
|
{
|
||||||
typedef integer_sequence <T, Indices...> type;
|
using type = integer_sequence <T, Indices...>;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T, T N>
|
template <class T, T N>
|
||||||
@@ -90,8 +90,8 @@ struct make_integer_sequence_checked
|
|||||||
static_assert (N >= 0,
|
static_assert (N >= 0,
|
||||||
"N must be non-negative");
|
"N must be non-negative");
|
||||||
|
|
||||||
typedef typename make_integer_sequence_unchecked <
|
using type = typename make_integer_sequence_unchecked <
|
||||||
T, N, integer_sequence<T>>::type type;
|
T, N, integer_sequence<T>>::type;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // detail
|
} // detail
|
||||||
@@ -116,20 +116,20 @@ namespace detail {
|
|||||||
template <size_t... Ints>
|
template <size_t... Ints>
|
||||||
struct index_tuple
|
struct index_tuple
|
||||||
{
|
{
|
||||||
typedef index_tuple <Ints..., sizeof... (Ints)> next;
|
using next = index_tuple <Ints..., sizeof... (Ints)>;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <size_t N>
|
template <size_t N>
|
||||||
struct build_index_tuple
|
struct build_index_tuple
|
||||||
{
|
{
|
||||||
typedef typename build_index_tuple <N-1>::type::next type;
|
using type = typename build_index_tuple <N-1>::type::next;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct build_index_tuple <0>
|
struct build_index_tuple <0>
|
||||||
{
|
{
|
||||||
typedef index_tuple<> type;
|
using type = index_tuple<>;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T, T N,
|
template <class T, T N,
|
||||||
@@ -146,7 +146,7 @@ struct make_integer_sequence <T, N, index_tuple <Ints...>>
|
|||||||
static_assert (N >= 0,
|
static_assert (N >= 0,
|
||||||
"N must be non-negative");
|
"N must be non-negative");
|
||||||
|
|
||||||
typedef integer_sequence <T, static_cast <T> (Ints)...> type;
|
using type = integer_sequence <T, static_cast <T> (Ints)...>;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // detail
|
} // detail
|
||||||
|
|||||||
@@ -34,9 +34,9 @@
|
|||||||
namespace beast {
|
namespace beast {
|
||||||
namespace detail {
|
namespace detail {
|
||||||
|
|
||||||
typedef std::uint64_t u64;
|
using u64 = std::uint64_t;
|
||||||
typedef std::uint32_t u32;
|
using u32 = std::uint32_t;
|
||||||
typedef std::uint8_t u8;
|
using u8 = std::uint8_t;
|
||||||
|
|
||||||
inline
|
inline
|
||||||
u64
|
u64
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ private:
|
|||||||
std::size_t m_seed;
|
std::size_t m_seed;
|
||||||
PRNG m_prng;
|
PRNG m_prng;
|
||||||
|
|
||||||
typedef block_stream <std::size_t, prng_hasher <PRNG>> base;
|
using base = block_stream <std::size_t, prng_hasher <PRNG>>;
|
||||||
friend base;
|
friend base;
|
||||||
|
|
||||||
// compress
|
// compress
|
||||||
@@ -351,8 +351,8 @@ struct is_contiguously_hashable <hash_append_tests::FastKey>
|
|||||||
class hash_append_test : public unit_test::suite
|
class hash_append_test : public unit_test::suite
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef hash_append_tests::SlowKey SlowKey;
|
using SlowKey = hash_append_tests::SlowKey;
|
||||||
typedef hash_append_tests::FastKey FastKey;
|
using FastKey = hash_append_tests::FastKey;
|
||||||
|
|
||||||
struct results_t
|
struct results_t
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ template <class FwdIter>
|
|||||||
float
|
float
|
||||||
distribution_factor (FwdIter first, FwdIter last)
|
distribution_factor (FwdIter first, FwdIter last)
|
||||||
{
|
{
|
||||||
typedef typename FwdIter::value_type value_type;
|
using value_type = typename FwdIter::value_type;
|
||||||
static_assert (std::is_unsigned <value_type>::value, "");
|
static_assert (std::is_unsigned <value_type>::value, "");
|
||||||
|
|
||||||
const unsigned nbits = CHAR_BIT * sizeof(std::size_t);
|
const unsigned nbits = CHAR_BIT * sizeof(std::size_t);
|
||||||
|
|||||||
@@ -61,9 +61,9 @@ private:
|
|||||||
void *data;
|
void *data;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef int (*data_cb_t) (
|
using data_cb_t = int (*) (
|
||||||
state_t*, const char *at, size_t length);
|
state_t*, const char *at, size_t length);
|
||||||
typedef int (*cb_t) (state_t*);
|
using cb_t = int (*) (state_t*);
|
||||||
|
|
||||||
struct hooks_t
|
struct hooks_t
|
||||||
{
|
{
|
||||||
@@ -87,7 +87,7 @@ private:
|
|||||||
std::string value_;
|
std::string value_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef boost::system::error_code error_code;
|
using error_code = boost::system::error_code;
|
||||||
|
|
||||||
virtual
|
virtual
|
||||||
~basic_parser() = default;
|
~basic_parser() = default;
|
||||||
|
|||||||
@@ -35,13 +35,13 @@ namespace http {
|
|||||||
class body
|
class body
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
typedef boost::asio::streambuf buffer_type;
|
using buffer_type = boost::asio::streambuf;
|
||||||
|
|
||||||
// Hack: use unique_ptr because streambuf cant be moved
|
// Hack: use unique_ptr because streambuf cant be moved
|
||||||
std::unique_ptr <buffer_type> buf_;
|
std::unique_ptr <buffer_type> buf_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef buffer_type::const_buffers_type const_buffers_type;
|
using const_buffers_type = buffer_type::const_buffers_type;
|
||||||
|
|
||||||
body();
|
body();
|
||||||
body (body&& other);
|
body (body&& other);
|
||||||
|
|||||||
@@ -37,9 +37,9 @@ template <class Allocator = std::allocator <char>>
|
|||||||
using basic_field_string =
|
using basic_field_string =
|
||||||
std::basic_string <char, ci_char_traits, Allocator>;
|
std::basic_string <char, ci_char_traits, Allocator>;
|
||||||
|
|
||||||
typedef basic_field_string <> field_string;
|
using field_string = basic_field_string <>;
|
||||||
|
|
||||||
typedef boost::basic_string_ref <char, ci_char_traits> field_string_ref;
|
using field_string_ref = boost::basic_string_ref <char, ci_char_traits>;
|
||||||
|
|
||||||
/** Returns `true` if two header fields are the same.
|
/** Returns `true` if two header fields are the same.
|
||||||
The comparison is case-insensitive.
|
The comparison is case-insensitive.
|
||||||
|
|||||||
@@ -76,21 +76,21 @@ private:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef boost::intrusive::make_list <element,
|
using list_t = boost::intrusive::make_list <element,
|
||||||
boost::intrusive::constant_time_size <false>
|
boost::intrusive::constant_time_size <false>
|
||||||
>::type list_t;
|
>::type;
|
||||||
|
|
||||||
typedef boost::intrusive::make_set <element,
|
using set_t = boost::intrusive::make_set <element,
|
||||||
boost::intrusive::constant_time_size <true>
|
boost::intrusive::constant_time_size <true>
|
||||||
>::type set_t;
|
>::type;
|
||||||
|
|
||||||
list_t list_;
|
list_t list_;
|
||||||
set_t set_;
|
set_t set_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef boost::transform_iterator <transform,
|
using iterator = boost::transform_iterator <transform,
|
||||||
list_t::const_iterator> iterator;
|
list_t::const_iterator>;
|
||||||
typedef iterator const_iterator;
|
using const_iterator = iterator;
|
||||||
|
|
||||||
~headers()
|
~headers()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -128,9 +128,9 @@ save certain data for later usage, you can do that from the callbacks.
|
|||||||
|
|
||||||
There are two types of callbacks:
|
There are two types of callbacks:
|
||||||
|
|
||||||
* notification `typedef int (*http_cb) (http_parser*);`
|
* notification `using http_cb = int (*) (http_parser*);`
|
||||||
Callbacks: on_message_begin, on_headers_complete, on_message_complete.
|
Callbacks: on_message_begin, on_headers_complete, on_message_complete.
|
||||||
* data `typedef int (*http_data_cb) (http_parser*, const char *at, size_t length);`
|
* data `using http_data_cb = int (*) (http_parser*, const char *at, size_t length);`
|
||||||
Callbacks: (requests only) on_uri,
|
Callbacks: (requests only) on_uri,
|
||||||
(common) on_header_field, on_header_value, on_body;
|
(common) on_header_field, on_header_value, on_body;
|
||||||
|
|
||||||
|
|||||||
@@ -111,8 +111,8 @@ convert_http_errno (joyent::http_errno err)
|
|||||||
: public boost::system::error_category
|
: public boost::system::error_category
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
typedef boost::system::error_code error_code;
|
using error_code = boost::system::error_code;
|
||||||
typedef boost::system::error_condition error_condition;
|
using error_condition = boost::system::error_condition;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
char const*
|
char const*
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ namespace http {
|
|||||||
class raw_parser
|
class raw_parser
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
typedef boost::system::error_code error_code;
|
using error_code = boost::system::error_code;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum message_type
|
enum message_type
|
||||||
@@ -174,9 +174,9 @@ private:
|
|||||||
void *data;
|
void *data;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef int (*data_cb_t) (
|
using data_cb_t = int (*) (
|
||||||
state_t*, const char *at, size_t length);
|
state_t*, const char *at, size_t length);
|
||||||
typedef int (*cb_t) (state_t*);
|
using cb_t = int (*) (state_t*);
|
||||||
|
|
||||||
struct hooks_t
|
struct hooks_t
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ namespace insight {
|
|||||||
class BaseImpl
|
class BaseImpl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::shared_ptr <BaseImpl> ptr;
|
using ptr = std::shared_ptr <BaseImpl>;
|
||||||
|
|
||||||
virtual ~BaseImpl () = 0;
|
virtual ~BaseImpl () = 0;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ namespace insight {
|
|||||||
class Collector
|
class Collector
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::shared_ptr <Collector> ptr;
|
using ptr = std::shared_ptr <Collector>;
|
||||||
|
|
||||||
virtual ~Collector() = 0;
|
virtual ~Collector() = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ namespace insight {
|
|||||||
class Counter : public Base
|
class Counter : public Base
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef CounterImpl::value_type value_type;
|
using value_type = CounterImpl::value_type;
|
||||||
|
|
||||||
/** Create a null metric.
|
/** Create a null metric.
|
||||||
A null metric reports no information.
|
A null metric reports no information.
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class CounterImpl
|
|||||||
, public BaseImpl
|
, public BaseImpl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::int64_t value_type;
|
using value_type = std::int64_t;
|
||||||
|
|
||||||
virtual ~CounterImpl () = 0;
|
virtual ~CounterImpl () = 0;
|
||||||
virtual void increment (value_type amount) = 0;
|
virtual void increment (value_type amount) = 0;
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ namespace insight {
|
|||||||
class Event : public Base
|
class Event : public Base
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef EventImpl::value_type value_type;
|
using value_type = EventImpl::value_type;
|
||||||
|
|
||||||
/** Create a null metric.
|
/** Create a null metric.
|
||||||
A null metric reports no information.
|
A null metric reports no information.
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class EventImpl
|
|||||||
, public BaseImpl
|
, public BaseImpl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::chrono::milliseconds value_type;
|
using value_type = std::chrono::milliseconds;
|
||||||
|
|
||||||
virtual ~EventImpl () = 0;
|
virtual ~EventImpl () = 0;
|
||||||
virtual void notify (value_type const& value) = 0;
|
virtual void notify (value_type const& value) = 0;
|
||||||
|
|||||||
@@ -40,8 +40,8 @@ namespace insight {
|
|||||||
class Gauge : public Base
|
class Gauge : public Base
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef GaugeImpl::value_type value_type;
|
using value_type = GaugeImpl::value_type;
|
||||||
typedef GaugeImpl::difference_type difference_type;
|
using difference_type = GaugeImpl::difference_type;
|
||||||
|
|
||||||
/** Create a null metric.
|
/** Create a null metric.
|
||||||
A null metric reports no information.
|
A null metric reports no information.
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ class GaugeImpl
|
|||||||
, public BaseImpl
|
, public BaseImpl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::uint64_t value_type;
|
using value_type = std::uint64_t;
|
||||||
typedef std::int64_t difference_type;
|
using difference_type = std::int64_t;
|
||||||
|
|
||||||
virtual ~GaugeImpl () = 0;
|
virtual ~GaugeImpl () = 0;
|
||||||
virtual void set (value_type value) = 0;
|
virtual void set (value_type value) = 0;
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ namespace insight {
|
|||||||
class Group : public Collector
|
class Group : public Collector
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::shared_ptr <Group> ptr;
|
using ptr = std::shared_ptr <Group>;
|
||||||
|
|
||||||
/** Returns the name of this group, for diagnostics. */
|
/** Returns the name of this group, for diagnostics. */
|
||||||
virtual std::string const& name () const = 0;
|
virtual std::string const& name () const = 0;
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class HookImpl
|
|||||||
, public BaseImpl
|
, public BaseImpl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::function <void (void)> HandlerType;
|
using HandlerType = std::function <void (void)>;
|
||||||
|
|
||||||
virtual ~HookImpl () = 0;
|
virtual ~HookImpl () = 0;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ namespace insight {
|
|||||||
class Meter : public Base
|
class Meter : public Base
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef MeterImpl::value_type value_type;
|
using value_type = MeterImpl::value_type;
|
||||||
|
|
||||||
/** Create a null metric.
|
/** Create a null metric.
|
||||||
A null metric reports no information.
|
A null metric reports no information.
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class MeterImpl
|
|||||||
, public BaseImpl
|
, public BaseImpl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::uint64_t value_type;
|
using value_type = std::uint64_t;
|
||||||
|
|
||||||
virtual ~MeterImpl () = 0;
|
virtual ~MeterImpl () = 0;
|
||||||
virtual void increment (value_type amount) = 0;
|
virtual void increment (value_type amount) = 0;
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class GroupImp
|
|||||||
, public Group
|
, public Group
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::vector <std::shared_ptr <BaseImpl>> Items;
|
using Items = std::vector <std::shared_ptr <BaseImpl>>;
|
||||||
|
|
||||||
std::string const m_name;
|
std::string const m_name;
|
||||||
Collector::ptr m_collector;
|
Collector::ptr m_collector;
|
||||||
@@ -91,7 +91,7 @@ private:
|
|||||||
class GroupsImp : public Groups
|
class GroupsImp : public Groups
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::unordered_map <std::string, std::shared_ptr <Group>, uhash <>> Items;
|
using Items = std::unordered_map <std::string, std::shared_ptr <Group>, uhash <>>;
|
||||||
|
|
||||||
Collector::ptr m_collector;
|
Collector::ptr m_collector;
|
||||||
Items m_items;
|
Items m_items;
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ private:
|
|||||||
List <StatsDMetricBase> metrics;
|
List <StatsDMetricBase> metrics;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef SharedData <StateType> State;
|
using State = SharedData <StateType>;
|
||||||
|
|
||||||
Journal m_journal;
|
Journal m_journal;
|
||||||
IP::Endpoint m_address;
|
IP::Endpoint m_address;
|
||||||
|
|||||||
@@ -37,13 +37,13 @@ namespace detail {
|
|||||||
template <typename T, typename U>
|
template <typename T, typename U>
|
||||||
struct CopyConst
|
struct CopyConst
|
||||||
{
|
{
|
||||||
typedef typename std::remove_const <U>::type type;
|
using type = typename std::remove_const <U>::type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T, typename U>
|
template <typename T, typename U>
|
||||||
struct CopyConst <T const, U>
|
struct CopyConst <T const, U>
|
||||||
{
|
{
|
||||||
typedef typename std::remove_const <U>::type const type;
|
using type = typename std::remove_const <U>::type const;
|
||||||
};
|
};
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ template <typename T, typename Tag>
|
|||||||
class ListNode
|
class ListNode
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
typedef T value_type;
|
using value_type = T;
|
||||||
|
|
||||||
friend class List<T, Tag>;
|
friend class List<T, Tag>;
|
||||||
|
|
||||||
@@ -73,11 +73,11 @@ class ListIterator : public std::iterator <
|
|||||||
std::bidirectional_iterator_tag, std::size_t>
|
std::bidirectional_iterator_tag, std::size_t>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef typename detail::CopyConst <
|
using value_type = typename detail::CopyConst <
|
||||||
N, typename N::value_type>::type value_type;
|
N, typename N::value_type>::type;
|
||||||
typedef value_type* pointer;
|
using pointer = value_type*;
|
||||||
typedef value_type& reference;
|
using reference = value_type&;
|
||||||
typedef std::size_t size_type;
|
using size_type = std::size_t;
|
||||||
|
|
||||||
ListIterator (N* node = nullptr) noexcept
|
ListIterator (N* node = nullptr) noexcept
|
||||||
: m_node (node)
|
: m_node (node)
|
||||||
@@ -242,8 +242,8 @@ private:
|
|||||||
struct ProcessTag { };
|
struct ProcessTag { };
|
||||||
struct UpdateTag { };
|
struct UpdateTag { };
|
||||||
|
|
||||||
typedef List <Actor, ProcessTag> ProcessList;
|
using ProcessList = List <Actor, ProcessTag>;
|
||||||
typedef List <Actor, UpdateTag> UpdateList;
|
using UpdateList = List <Actor, UpdateTag>;
|
||||||
|
|
||||||
// Derive from both node types so we can be in each list at once.
|
// Derive from both node types so we can be in each list at once.
|
||||||
//
|
//
|
||||||
@@ -267,18 +267,18 @@ template <typename T, typename Tag = void>
|
|||||||
class List
|
class List
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef typename detail::ListNode <T, Tag> Node;
|
using Node = typename detail::ListNode <T, Tag>;
|
||||||
|
|
||||||
typedef T value_type;
|
using value_type = T;
|
||||||
typedef value_type* pointer;
|
using pointer = value_type*;
|
||||||
typedef value_type& reference;
|
using reference = value_type&;
|
||||||
typedef value_type const* const_pointer;
|
using const_pointer = value_type const*;
|
||||||
typedef value_type const& const_reference;
|
using const_reference = value_type const&;
|
||||||
typedef std::size_t size_type;
|
using size_type = std::size_t;
|
||||||
typedef std::ptrdiff_t difference_type;
|
using difference_type = std::ptrdiff_t;
|
||||||
|
|
||||||
typedef detail::ListIterator <Node> iterator;
|
using iterator = detail::ListIterator <Node>;
|
||||||
typedef detail::ListIterator <Node const> const_iterator;
|
using const_iterator = detail::ListIterator <Node const>;
|
||||||
|
|
||||||
/** Create an empty list. */
|
/** Create an empty list. */
|
||||||
List ()
|
List ()
|
||||||
|
|||||||
@@ -42,18 +42,18 @@ class LockFreeStackIterator
|
|||||||
typename Container::reference>::type>
|
typename Container::reference>::type>
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
typedef typename Container::Node Node;
|
using Node = typename Container::Node;
|
||||||
typedef typename std::conditional <
|
using NodePtr = typename std::conditional <
|
||||||
IsConst, Node const*, Node*>::type NodePtr;
|
IsConst, Node const*, Node*>::type;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef typename Container::value_type value_type;
|
using value_type = typename Container::value_type;
|
||||||
typedef typename std::conditional <IsConst,
|
using pointer = typename std::conditional <IsConst,
|
||||||
typename Container::const_pointer,
|
typename Container::const_pointer,
|
||||||
typename Container::pointer>::type pointer;
|
typename Container::pointer>::type;
|
||||||
typedef typename std::conditional <IsConst,
|
using reference = typename std::conditional <IsConst,
|
||||||
typename Container::const_reference,
|
typename Container::const_reference,
|
||||||
typename Container::reference>::type reference;
|
typename Container::reference>::type;
|
||||||
|
|
||||||
LockFreeStackIterator ()
|
LockFreeStackIterator ()
|
||||||
: m_node ()
|
: m_node ()
|
||||||
@@ -167,17 +167,17 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef Element value_type;
|
using value_type = Element;
|
||||||
typedef Element* pointer;
|
using pointer = Element*;
|
||||||
typedef Element& reference;
|
using reference = Element&;
|
||||||
typedef Element const* const_pointer;
|
using const_pointer = Element const*;
|
||||||
typedef Element const& const_reference;
|
using const_reference = Element const&;
|
||||||
typedef std::size_t size_type;
|
using size_type = std::size_t;
|
||||||
typedef std::ptrdiff_t difference_type;
|
using difference_type = std::ptrdiff_t;
|
||||||
typedef LockFreeStackIterator <
|
using iterator = LockFreeStackIterator <
|
||||||
LockFreeStack <Element, Tag>, false> iterator;
|
LockFreeStack <Element, Tag>, false>;
|
||||||
typedef LockFreeStackIterator <
|
using const_iterator = LockFreeStackIterator <
|
||||||
LockFreeStack <Element, Tag>, true> const_iterator;
|
LockFreeStack <Element, Tag>, true>;
|
||||||
|
|
||||||
LockFreeStack ()
|
LockFreeStack ()
|
||||||
: m_end (nullptr)
|
: m_end (nullptr)
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ template <typename ElementType,
|
|||||||
class Array
|
class Array
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
typedef ElementType ParameterType;
|
using ParameterType = ElementType;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
@@ -1021,7 +1021,7 @@ public:
|
|||||||
inline const TypeOfCriticalSectionToUse& getLock() const noexcept { return data; }
|
inline const TypeOfCriticalSectionToUse& getLock() const noexcept { return data; }
|
||||||
|
|
||||||
/** Returns the type of scoped lock to use for locking this array */
|
/** Returns the type of scoped lock to use for locking this array */
|
||||||
typedef typename TypeOfCriticalSectionToUse::ScopedLockType ScopedLockType;
|
using ScopedLockType = typename TypeOfCriticalSectionToUse::ScopedLockType;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ template <class ElementType>
|
|||||||
class DefaultElementComparator
|
class DefaultElementComparator
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
typedef ElementType ParameterType;
|
using ParameterType = ElementType;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static int compareElements (ParameterType first, ParameterType second)
|
static int compareElements (ParameterType first, ParameterType second)
|
||||||
|
|||||||
@@ -322,7 +322,7 @@ int compare (SemanticVersion const& lhs, SemanticVersion const& rhs)
|
|||||||
|
|
||||||
class SemanticVersion_test: public unit_test::suite
|
class SemanticVersion_test: public unit_test::suite
|
||||||
{
|
{
|
||||||
typedef SemanticVersion::identifier_list identifier_list;
|
using identifier_list = SemanticVersion::identifier_list;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void checkPass (std::string const& input, bool shouldPass = true)
|
void checkPass (std::string const& input, bool shouldPass = true)
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ namespace beast {
|
|||||||
class SemanticVersion
|
class SemanticVersion
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::vector<std::string> identifier_list;
|
using identifier_list = std::vector<std::string>;
|
||||||
|
|
||||||
int majorVersion;
|
int majorVersion;
|
||||||
int minorVersion;
|
int minorVersion;
|
||||||
|
|||||||
@@ -74,8 +74,8 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Standard container interface
|
// Standard container interface
|
||||||
typedef char* iterator;
|
using iterator = char*;
|
||||||
typedef char const* const_iterator;
|
using const_iterator = char const*;
|
||||||
inline iterator begin () noexcept { return static_cast <iterator> (getData ()); }
|
inline iterator begin () noexcept { return static_cast <iterator> (getData ()); }
|
||||||
inline iterator end () noexcept { return addBytesToPointer (begin (), size); }
|
inline iterator end () noexcept { return addBytesToPointer (begin (), size); }
|
||||||
inline const_iterator cbegin () const noexcept { return static_cast <const_iterator> (getConstData ()); }
|
inline const_iterator cbegin () const noexcept { return static_cast <const_iterator> (getConstData ()); }
|
||||||
|
|||||||
@@ -104,10 +104,10 @@ namespace
|
|||||||
{
|
{
|
||||||
#if BEAST_LINUX || \
|
#if BEAST_LINUX || \
|
||||||
(BEAST_IOS && ! __DARWIN_ONLY_64_BIT_INO_T) // (this iOS stuff is to avoid a simulator bug)
|
(BEAST_IOS && ! __DARWIN_ONLY_64_BIT_INO_T) // (this iOS stuff is to avoid a simulator bug)
|
||||||
typedef struct stat64 beast_statStruct;
|
using beast_statStruct = struct stat64;
|
||||||
#define BEAST_STAT stat64
|
#define BEAST_STAT stat64
|
||||||
#else
|
#else
|
||||||
typedef struct stat beast_statStruct;
|
using beast_statStruct = struct stat;
|
||||||
#define BEAST_STAT stat
|
#define BEAST_STAT stat
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ namespace SystemStats
|
|||||||
getStackBacktrace();
|
getStackBacktrace();
|
||||||
|
|
||||||
/** A void() function type, used by setApplicationCrashHandler(). */
|
/** A void() function type, used by setApplicationCrashHandler(). */
|
||||||
typedef void (*CrashHandlerFunction)();
|
using CrashHandlerFunction = void (*)();
|
||||||
|
|
||||||
/** Sets up a global callback function that will be called if the application
|
/** Sets up a global callback function that will be called if the application
|
||||||
executes some kind of illegal instruction.
|
executes some kind of illegal instruction.
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ class DeadlineTimer::Manager
|
|||||||
: protected Thread
|
: protected Thread
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
typedef CriticalSection LockType;
|
using LockType = CriticalSection;
|
||||||
typedef List <DeadlineTimer> Items;
|
using Items = List <DeadlineTimer>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Manager () : Thread ("DeadlineTimer::Manager")
|
Manager () : Thread ("DeadlineTimer::Manager")
|
||||||
|
|||||||
@@ -92,13 +92,13 @@ public:
|
|||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
/** Provides the type of scoped lock to use with a CriticalSection. */
|
/** Provides the type of scoped lock to use with a CriticalSection. */
|
||||||
typedef GenericScopedLock <CriticalSection> ScopedLockType;
|
using ScopedLockType = GenericScopedLock <CriticalSection>;
|
||||||
|
|
||||||
/** Provides the type of scoped unlocker to use with a CriticalSection. */
|
/** Provides the type of scoped unlocker to use with a CriticalSection. */
|
||||||
typedef GenericScopedUnlock <CriticalSection> ScopedUnlockType;
|
using ScopedUnlockType = GenericScopedUnlock <CriticalSection>;
|
||||||
|
|
||||||
/** Provides the type of scoped try-locker to use with a CriticalSection. */
|
/** Provides the type of scoped try-locker to use with a CriticalSection. */
|
||||||
typedef GenericScopedTryLock <CriticalSection> ScopedTryLockType;
|
using ScopedTryLockType = GenericScopedTryLock <CriticalSection>;
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -161,7 +161,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
/** A dummy scoped-unlocker type to use with a dummy critical section. */
|
/** A dummy scoped-unlocker type to use with a dummy critical section. */
|
||||||
typedef ScopedLockType ScopedUnlockType;
|
using ScopedUnlockType = ScopedLockType;
|
||||||
};
|
};
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
@@ -187,7 +187,7 @@ public:
|
|||||||
|
|
||||||
@see CriticalSection, ScopedUnlock
|
@see CriticalSection, ScopedUnlock
|
||||||
*/
|
*/
|
||||||
typedef CriticalSection::ScopedLockType ScopedLock;
|
using ScopedLock = CriticalSection::ScopedLockType;
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
/**
|
/**
|
||||||
@@ -227,7 +227,7 @@ typedef CriticalSection::ScopedLockType ScopedLock;
|
|||||||
|
|
||||||
@see CriticalSection, ScopedLock
|
@see CriticalSection, ScopedLock
|
||||||
*/
|
*/
|
||||||
typedef CriticalSection::ScopedUnlockType ScopedUnlock;
|
using ScopedUnlock = CriticalSection::ScopedUnlockType;
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
/**
|
/**
|
||||||
@@ -260,7 +260,7 @@ typedef CriticalSection::ScopedUnlockType ScopedUnlock;
|
|||||||
|
|
||||||
@see CriticalSection::tryEnter, ScopedLock, ScopedUnlock, ScopedReadLock
|
@see CriticalSection::tryEnter, ScopedLock, ScopedUnlock, ScopedReadLock
|
||||||
*/
|
*/
|
||||||
typedef CriticalSection::ScopedTryLockType ScopedTryLock;
|
using ScopedTryLock = CriticalSection::ScopedTryLockType;
|
||||||
|
|
||||||
} // beast
|
} // beast
|
||||||
|
|
||||||
|
|||||||
@@ -86,8 +86,8 @@ private:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef CriticalSection MutexType;
|
using MutexType = CriticalSection;
|
||||||
typedef MutexType::ScopedLockType ScopedLockType;
|
using ScopedLockType = MutexType::ScopedLockType;
|
||||||
|
|
||||||
static StaticDestructor s_staticDestructor;
|
static StaticDestructor s_staticDestructor;
|
||||||
|
|
||||||
|
|||||||
@@ -92,11 +92,11 @@ namespace TimeHelpers
|
|||||||
static inline String formatString (const String& format, const struct tm* const tm)
|
static inline String formatString (const String& format, const struct tm* const tm)
|
||||||
{
|
{
|
||||||
#if BEAST_ANDROID
|
#if BEAST_ANDROID
|
||||||
typedef CharPointer_UTF8 StringType;
|
using StringType = CharPointer_UTF8;
|
||||||
#elif BEAST_WINDOWS
|
#elif BEAST_WINDOWS
|
||||||
typedef CharPointer_UTF16 StringType;
|
using StringType = CharPointer_UTF16;
|
||||||
#else
|
#else
|
||||||
typedef CharPointer_UTF32 StringType;
|
using StringType = CharPointer_UTF32;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (size_t bufferSize = 256; ; bufferSize += 256)
|
for (size_t bufferSize = 256; ; bufferSize += 256)
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public:
|
|||||||
defaultBlocksize = 32 * 1024
|
defaultBlocksize = 32 * 1024
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::size_t size_type;
|
using size_type = std::size_t;
|
||||||
|
|
||||||
/** Create the dynamic buffer with the specified block size. */
|
/** Create the dynamic buffer with the specified block size. */
|
||||||
explicit DynamicBuffer (size_type blocksize = defaultBlocksize);
|
explicit DynamicBuffer (size_type blocksize = defaultBlocksize);
|
||||||
@@ -116,7 +116,7 @@ public:
|
|||||||
std::string to_string () const;
|
std::string to_string () const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::vector <void*> Buffers;
|
using Buffers = std::vector <void*>;
|
||||||
|
|
||||||
size_type m_blocksize;
|
size_type m_blocksize;
|
||||||
size_type m_size;
|
size_type m_size;
|
||||||
|
|||||||
@@ -109,8 +109,8 @@ struct AddressV4
|
|||||||
class Proxy
|
class Proxy
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef typename std::conditional <
|
using Pointer = typename std::conditional <
|
||||||
IsConst, std::uint32_t const*, std::uint32_t*>::type Pointer;
|
IsConst, std::uint32_t const*, std::uint32_t*>::type;
|
||||||
|
|
||||||
Proxy (int shift, Pointer value)
|
Proxy (int shift, Pointer value)
|
||||||
: m_shift (shift)
|
: m_shift (shift)
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
namespace beast {
|
namespace beast {
|
||||||
namespace IP {
|
namespace IP {
|
||||||
|
|
||||||
typedef std::uint16_t Port;
|
using Port = std::uint16_t;
|
||||||
|
|
||||||
/** A version-independent IP address and port combination. */
|
/** A version-independent IP address and port combination. */
|
||||||
class Endpoint
|
class Endpoint
|
||||||
|
|||||||
@@ -42,9 +42,9 @@ namespace beast {
|
|||||||
{
|
{
|
||||||
void foo();
|
void foo();
|
||||||
|
|
||||||
// This is a neat way of declaring a typedef for a pointer class,
|
// This is a neat way of declaring a using Ptr = for a pointer class,
|
||||||
// rather than typing out the full templated name each time..
|
// rather than typing out the full templated name each time..
|
||||||
typedef SharedPtr<MyClass> Ptr;
|
using Ptr = SharedPtr<MyClass>;
|
||||||
};
|
};
|
||||||
|
|
||||||
MyClass::Ptr p = new MyClass();
|
MyClass::Ptr p = new MyClass();
|
||||||
|
|||||||
@@ -48,12 +48,12 @@ namespace beast {
|
|||||||
reference-countable class by implementing a pair of methods called
|
reference-countable class by implementing a pair of methods called
|
||||||
incReferenceCount() and decReferenceCount().
|
incReferenceCount() and decReferenceCount().
|
||||||
|
|
||||||
When using this class, you'll probably want to create a typedef to
|
When using this class, you'll probably want to create a using MyClassPtr = to
|
||||||
abbreviate the full templated name - e.g.
|
abbreviate the full templated name - e.g.
|
||||||
|
|
||||||
@code
|
@code
|
||||||
|
|
||||||
typedef SharedPtr <MyClass> MyClassPtr;
|
using MyClassPtr = SharedPtr <MyClass>;
|
||||||
|
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
@@ -63,10 +63,10 @@ template <class T>
|
|||||||
class SharedPtr
|
class SharedPtr
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef T value_type;
|
using value_type = T;
|
||||||
|
|
||||||
/** The class being referenced by this container. */
|
/** The class being referenced by this container. */
|
||||||
typedef T ReferencedType;
|
using ReferencedType = T;
|
||||||
|
|
||||||
/** Construct a container pointing to nothing. */
|
/** Construct a container pointing to nothing. */
|
||||||
SharedPtr () noexcept
|
SharedPtr () noexcept
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
namespace beast {
|
namespace beast {
|
||||||
|
|
||||||
/** An abstract ostream for `char`. */
|
/** An abstract ostream for `char`. */
|
||||||
typedef basic_abstract_ostream <char> abstract_ostream;
|
using abstract_ostream = basic_abstract_ostream <char>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ template <
|
|||||||
class basic_abstract_ostream
|
class basic_abstract_ostream
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::basic_string <CharT, Traits> string_type;
|
using string_type = std::basic_string <CharT, Traits>;
|
||||||
typedef basic_scoped_ostream <CharT, Traits> scoped_stream_type;
|
using scoped_stream_type = basic_scoped_ostream <CharT, Traits>;
|
||||||
|
|
||||||
basic_abstract_ostream() = default;
|
basic_abstract_ostream() = default;
|
||||||
|
|
||||||
|
|||||||
@@ -54,11 +54,11 @@ template <
|
|||||||
class basic_scoped_ostream
|
class basic_scoped_ostream
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
typedef std::function <void (
|
using handler_t = std::function <void (
|
||||||
std::basic_string <CharT, Traits, Allocator> const&)> handler_t;
|
std::basic_string <CharT, Traits, Allocator> const&)>;
|
||||||
|
|
||||||
typedef std::basic_ostringstream <
|
using stream_type = std::basic_ostringstream <
|
||||||
CharT, Traits, Allocator> stream_type;
|
CharT, Traits, Allocator>;
|
||||||
|
|
||||||
handler_t m_handler;
|
handler_t m_handler;
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ private:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef std::basic_string <CharT, Traits> string_type;
|
using string_type = std::basic_string <CharT, Traits>;
|
||||||
|
|
||||||
// Disallow copy since that would duplicate the output
|
// Disallow copy since that would duplicate the output
|
||||||
basic_scoped_ostream (basic_scoped_ostream const&) = delete;
|
basic_scoped_ostream (basic_scoped_ostream const&) = delete;
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef basic_std_ostream <char> std_ostream;
|
using std_ostream = basic_std_ostream <char>;
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ namespace beast {
|
|||||||
class CharPointer_ASCII
|
class CharPointer_ASCII
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef char CharType;
|
using CharType = char;
|
||||||
|
|
||||||
inline explicit CharPointer_ASCII (const CharType* const rawPointer) noexcept
|
inline explicit CharPointer_ASCII (const CharType* const rawPointer) noexcept
|
||||||
: data (const_cast <CharType*> (rawPointer))
|
: data (const_cast <CharType*> (rawPointer))
|
||||||
|
|||||||
@@ -42,9 +42,9 @@ class CharPointer_UTF16
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
#if BEAST_NATIVE_WCHAR_IS_UTF16
|
#if BEAST_NATIVE_WCHAR_IS_UTF16
|
||||||
typedef wchar_t CharType;
|
using CharType = wchar_t;
|
||||||
#else
|
#else
|
||||||
typedef std::int16_t CharType;
|
using CharType = std::int16_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
inline explicit CharPointer_UTF16 (const CharType* const rawPointer) noexcept
|
inline explicit CharPointer_UTF16 (const CharType* const rawPointer) noexcept
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ namespace beast {
|
|||||||
class CharPointer_UTF32
|
class CharPointer_UTF32
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef beast_wchar CharType;
|
using CharType = beast_wchar;
|
||||||
|
|
||||||
inline explicit CharPointer_UTF32 (const CharType* const rawPointer) noexcept
|
inline explicit CharPointer_UTF32 (const CharType* const rawPointer) noexcept
|
||||||
: data (const_cast <CharType*> (rawPointer))
|
: data (const_cast <CharType*> (rawPointer))
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ namespace beast {
|
|||||||
class CharPointer_UTF8
|
class CharPointer_UTF8
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef char CharType;
|
using CharType = char;
|
||||||
|
|
||||||
inline explicit CharPointer_UTF8 (const CharType* const rawPointer) noexcept
|
inline explicit CharPointer_UTF8 (const CharType* const rawPointer) noexcept
|
||||||
: data (const_cast <CharType*> (rawPointer))
|
: data (const_cast <CharType*> (rawPointer))
|
||||||
|
|||||||
@@ -49,9 +49,9 @@ namespace beast {
|
|||||||
|
|
||||||
#if BEAST_NATIVE_WCHAR_IS_UTF32 || DOXYGEN
|
#if BEAST_NATIVE_WCHAR_IS_UTF32 || DOXYGEN
|
||||||
/** A platform-independent 32-bit unicode character type. */
|
/** A platform-independent 32-bit unicode character type. */
|
||||||
typedef wchar_t beast_wchar;
|
using beast_wchar = wchar_t;
|
||||||
#else
|
#else
|
||||||
typedef std::uint32_t beast_wchar;
|
using beast_wchar = std::uint32_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef DOXYGEN
|
#ifndef DOXYGEN
|
||||||
|
|||||||
@@ -49,11 +49,11 @@
|
|||||||
namespace beast {
|
namespace beast {
|
||||||
|
|
||||||
#if BEAST_NATIVE_WCHAR_IS_UTF8
|
#if BEAST_NATIVE_WCHAR_IS_UTF8
|
||||||
typedef CharPointer_UTF8 CharPointer_wchar_t;
|
using CharPointer_wchar_t = CharPointer_UTF8;
|
||||||
#elif BEAST_NATIVE_WCHAR_IS_UTF16
|
#elif BEAST_NATIVE_WCHAR_IS_UTF16
|
||||||
typedef CharPointer_UTF16 CharPointer_wchar_t;
|
using CharPointer_wchar_t = CharPointer_UTF16;
|
||||||
#else
|
#else
|
||||||
typedef CharPointer_UTF32 CharPointer_wchar_t;
|
using CharPointer_wchar_t = CharPointer_UTF32;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
@@ -186,7 +186,7 @@ public:
|
|||||||
static const String empty;
|
static const String empty;
|
||||||
|
|
||||||
/** This is the character encoding type used internally to store the string. */
|
/** This is the character encoding type used internally to store the string. */
|
||||||
typedef StringCharPointerType CharPointerType;
|
using CharPointerType = StringCharPointerType;
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
/** Generates a probably-unique 32-bit hashcode from this string. */
|
/** Generates a probably-unique 32-bit hashcode from this string. */
|
||||||
|
|||||||
@@ -44,13 +44,13 @@ namespace beast {
|
|||||||
toUTF32() methods let you access the string's content in any of the other formats.
|
toUTF32() methods let you access the string's content in any of the other formats.
|
||||||
*/
|
*/
|
||||||
#if (BEAST_STRING_UTF_TYPE == 32)
|
#if (BEAST_STRING_UTF_TYPE == 32)
|
||||||
typedef CharPointer_UTF32 StringCharPointerType;
|
using StringCharPointerType = CharPointer_UTF32;
|
||||||
|
|
||||||
#elif (BEAST_STRING_UTF_TYPE == 16)
|
#elif (BEAST_STRING_UTF_TYPE == 16)
|
||||||
typedef CharPointer_UTF16 StringCharPointerType;
|
using StringCharPointerType = CharPointer_UTF16;
|
||||||
|
|
||||||
#elif (BEAST_STRING_UTF_TYPE == 8)
|
#elif (BEAST_STRING_UTF_TYPE == 8)
|
||||||
typedef CharPointer_UTF8 StringCharPointerType;
|
using StringCharPointerType = CharPointer_UTF8;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#error "You must set the value of BEAST_STRING_UTF_TYPE to be either 8, 16, or 32!"
|
#error "You must set the value of BEAST_STRING_UTF_TYPE to be either 8, 16, or 32!"
|
||||||
|
|||||||
@@ -82,8 +82,8 @@ public:
|
|||||||
text[0] = 0;
|
text[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef String::CharPointerType CharPointerType;
|
using CharPointerType = String::CharPointerType;
|
||||||
typedef String::CharPointerType::CharType CharType;
|
using CharType = String::CharPointerType::CharType;
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
static CharPointerType createUninitialisedBytes (const size_t numBytes)
|
static CharPointerType createUninitialisedBytes (const size_t numBytes)
|
||||||
@@ -1872,7 +1872,7 @@ struct StringEncodingConverter
|
|||||||
{
|
{
|
||||||
String& source = const_cast <String&> (s);
|
String& source = const_cast <String&> (s);
|
||||||
|
|
||||||
typedef typename CharPointerType_Dest::CharType DestChar;
|
using DestChar = typename CharPointerType_Dest::CharType;
|
||||||
|
|
||||||
if (source.isEmpty())
|
if (source.isEmpty())
|
||||||
return CharPointerType_Dest (reinterpret_cast <const DestChar*> (&emptyChar));
|
return CharPointerType_Dest (reinterpret_cast <const DestChar*> (&emptyChar));
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ namespace beast {
|
|||||||
class RecursiveMutex
|
class RecursiveMutex
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::lock_guard <RecursiveMutex> ScopedLockType;
|
using ScopedLockType = std::lock_guard <RecursiveMutex>;
|
||||||
typedef UnlockGuard <RecursiveMutex> ScopedUnlockType;
|
using ScopedUnlockType = UnlockGuard <RecursiveMutex>;
|
||||||
typedef TryLockGuard <RecursiveMutex> ScopedTryLockType;
|
using ScopedTryLockType = TryLockGuard <RecursiveMutex>;
|
||||||
|
|
||||||
/** Create the mutex.
|
/** Create the mutex.
|
||||||
The mutux is initially unowned.
|
The mutux is initially unowned.
|
||||||
|
|||||||
@@ -56,8 +56,8 @@ template <typename Context, typename ScopedType>
|
|||||||
class ScopedWrapperContext
|
class ScopedWrapperContext
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef Context context_type;
|
using context_type = Context;
|
||||||
typedef ScopedType scoped_type;
|
using scoped_type = ScopedType;
|
||||||
|
|
||||||
class Scope
|
class Scope
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ namespace beast {
|
|||||||
String value2;
|
String value2;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef SharedData <State> SharedState;
|
using SharedState = SharedData <State>;
|
||||||
|
|
||||||
SharedState m_state;
|
SharedState m_state;
|
||||||
|
|
||||||
@@ -113,11 +113,11 @@ template <typename Value, class SharedMutexType =
|
|||||||
class SharedData
|
class SharedData
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
typedef typename SharedMutexType::LockGuardType LockGuardType;
|
using LockGuardType = typename SharedMutexType::LockGuardType;
|
||||||
typedef typename SharedMutexType::SharedLockGuardType SharedLockGuardType;
|
using SharedLockGuardType = typename SharedMutexType::SharedLockGuardType;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef Value ValueType;
|
using ValueType = Value;
|
||||||
|
|
||||||
class Access;
|
class Access;
|
||||||
class ConstAccess;
|
class ConstAccess;
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ template <typename Mutex>
|
|||||||
class SharedLockGuard
|
class SharedLockGuard
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef Mutex MutexType;
|
using MutexType = Mutex;
|
||||||
|
|
||||||
explicit SharedLockGuard (Mutex const& mutex)
|
explicit SharedLockGuard (Mutex const& mutex)
|
||||||
: m_mutex (mutex)
|
: m_mutex (mutex)
|
||||||
|
|||||||
@@ -35,9 +35,9 @@ template <class Mutex>
|
|||||||
class SharedMutexAdapter
|
class SharedMutexAdapter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef Mutex MutexType;
|
using MutexType = Mutex;
|
||||||
typedef std::lock_guard <SharedMutexAdapter> LockGuardType;
|
using LockGuardType = std::lock_guard <SharedMutexAdapter>;
|
||||||
typedef SharedLockGuard <SharedMutexAdapter> SharedLockGuardType;
|
using SharedLockGuardType = SharedLockGuard <SharedMutexAdapter>;
|
||||||
|
|
||||||
void lock() const
|
void lock() const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -50,10 +50,10 @@ class SpinLock
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/** Provides the type of scoped lock to use for locking a SpinLock. */
|
/** Provides the type of scoped lock to use for locking a SpinLock. */
|
||||||
typedef std::lock_guard <SpinLock> ScopedLockType;
|
using ScopedLockType = std::lock_guard <SpinLock>;
|
||||||
|
|
||||||
/** Provides the type of scoped unlocker to use with a SpinLock. */
|
/** Provides the type of scoped unlocker to use with a SpinLock. */
|
||||||
typedef UnlockGuard <SpinLock> ScopedUnlockType;
|
using ScopedUnlockType = UnlockGuard <SpinLock>;
|
||||||
|
|
||||||
SpinLock()
|
SpinLock()
|
||||||
: m_lock (0)
|
: m_lock (0)
|
||||||
|
|||||||
@@ -253,7 +253,7 @@ private:
|
|||||||
friend class RootStoppable;
|
friend class RootStoppable;
|
||||||
|
|
||||||
struct Child;
|
struct Child;
|
||||||
typedef LockFreeStack <Child> Children;
|
using Children = LockFreeStack <Child>;
|
||||||
|
|
||||||
struct Child : Children::Node
|
struct Child : Children::Node
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ template <typename Mutex>
|
|||||||
class TryLockGuard
|
class TryLockGuard
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef Mutex MutexType;
|
using MutexType = Mutex;
|
||||||
|
|
||||||
explicit TryLockGuard (Mutex const& mutex)
|
explicit TryLockGuard (Mutex const& mutex)
|
||||||
: m_mutex (mutex)
|
: m_mutex (mutex)
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ template <typename Mutex>
|
|||||||
class UnlockGuard
|
class UnlockGuard
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef Mutex MutexType;
|
using MutexType = Mutex;
|
||||||
|
|
||||||
explicit UnlockGuard (Mutex const& mutex)
|
explicit UnlockGuard (Mutex const& mutex)
|
||||||
: m_mutex (mutex)
|
: m_mutex (mutex)
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ private:
|
|||||||
Handler m_handler;
|
Handler m_handler;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef void result_type;
|
using result_type = void;
|
||||||
|
|
||||||
DispatchedHandler (Dispatcher dispatcher, Handler& handler)
|
DispatchedHandler (Dispatcher dispatcher, Handler& handler)
|
||||||
: m_dispatcher (dispatcher)
|
: m_dispatcher (dispatcher)
|
||||||
|
|||||||
@@ -29,14 +29,14 @@ template <class Mutex, class CondVar>
|
|||||||
class basic_semaphore
|
class basic_semaphore
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
typedef std::unique_lock <Mutex> scoped_lock;
|
using scoped_lock = std::unique_lock <Mutex>;
|
||||||
|
|
||||||
Mutex m_mutex;
|
Mutex m_mutex;
|
||||||
CondVar m_cond;
|
CondVar m_cond;
|
||||||
std::size_t m_count;
|
std::size_t m_count;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef std::size_t size_type;
|
using size_type = std::size_t;
|
||||||
|
|
||||||
/** Create the semaphore, with an optional initial count.
|
/** Create the semaphore, with an optional initial count.
|
||||||
If unspecified, the initial count is zero.
|
If unspecified, the initial count is zero.
|
||||||
@@ -79,7 +79,7 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef basic_semaphore <std::mutex, std::condition_variable> semaphore;
|
using semaphore = basic_semaphore <std::mutex, std::condition_variable>;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ public:
|
|||||||
Multiline output sent to the stream will be atomically
|
Multiline output sent to the stream will be atomically
|
||||||
written to the underlying abstract_Ostream
|
written to the underlying abstract_Ostream
|
||||||
*/
|
*/
|
||||||
typedef abstract_ostream::scoped_stream_type scoped_stream;
|
using scoped_stream = abstract_ostream::scoped_stream_type;
|
||||||
|
|
||||||
/** Memberspace for logging. */
|
/** Memberspace for logging. */
|
||||||
log_t log;
|
log_t log;
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ private:
|
|||||||
List <Item> children;
|
List <Item> children;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef SharedData <State> SharedState;
|
using SharedState = SharedData <State>;
|
||||||
|
|
||||||
std::string const m_name;
|
std::string const m_name;
|
||||||
SharedState m_state;
|
SharedState m_state;
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ struct hash <std::pair <First, Second>>
|
|||||||
, private boost::base_from_member <std::hash <Second>, 1>
|
, private boost::base_from_member <std::hash <Second>, 1>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
typedef boost::base_from_member <std::hash <First>, 0> first_hash;
|
using first_hash = boost::base_from_member <std::hash <First>, 0>;
|
||||||
typedef boost::base_from_member <std::hash <Second>, 1> second_hash;
|
using second_hash = boost::base_from_member <std::hash <Second>, 1>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
hash ()
|
hash ()
|
||||||
|
|||||||
@@ -604,7 +604,7 @@ void PropertyStream::add (long double value)
|
|||||||
class PropertyStream_test : public unit_test::suite
|
class PropertyStream_test : public unit_test::suite
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef PropertyStream::Source Source;
|
using Source = PropertyStream::Source;
|
||||||
|
|
||||||
void test_peel_name (std::string s, std::string const& expected,
|
void test_peel_name (std::string s, std::string const& expected,
|
||||||
std::string const& expected_remainder)
|
std::string const& expected_remainder)
|
||||||
|
|||||||
@@ -32,13 +32,13 @@ namespace is_call_possible_detail
|
|||||||
template<typename Z>
|
template<typename Z>
|
||||||
struct add_reference
|
struct add_reference
|
||||||
{
|
{
|
||||||
typedef Z& type;
|
using type = Z&;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename Z>
|
template<typename Z>
|
||||||
struct add_reference<Z&>
|
struct add_reference<Z&>
|
||||||
{
|
{
|
||||||
typedef Z& type;
|
using type = Z&;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename Z> class void_exp_result {};
|
template <typename Z> class void_exp_result {};
|
||||||
@@ -52,13 +52,13 @@ namespace is_call_possible_detail
|
|||||||
template <typename src_type, typename dest_type>
|
template <typename src_type, typename dest_type>
|
||||||
struct clone_constness
|
struct clone_constness
|
||||||
{
|
{
|
||||||
typedef dest_type type;
|
using type = dest_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename src_type, typename dest_type>
|
template <typename src_type, typename dest_type>
|
||||||
struct clone_constness<const src_type, dest_type>
|
struct clone_constness<const src_type, dest_type>
|
||||||
{
|
{
|
||||||
typedef const dest_type type;
|
using type = const dest_type;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -165,7 +165,7 @@ template <typename DT, typename IsCallPossibleSignature>
|
|||||||
struct trait_name \
|
struct trait_name \
|
||||||
{ \
|
{ \
|
||||||
private: \
|
private: \
|
||||||
typedef std::remove_reference_t <DT> Z; \
|
using Z = std::remove_reference_t <DT>; \
|
||||||
class yes {}; \
|
class yes {}; \
|
||||||
class no { yes m[2]; }; \
|
class no { yes m[2]; }; \
|
||||||
struct derived : public Z \
|
struct derived : public Z \
|
||||||
@@ -175,7 +175,7 @@ private:
|
|||||||
private: derived (); \
|
private: derived (); \
|
||||||
}; \
|
}; \
|
||||||
\
|
\
|
||||||
typedef typename beast::is_call_possible_detail::clone_constness<Z, derived>::type derived_type; \
|
using derived_type = typename beast::is_call_possible_detail::clone_constness<Z, derived>::type; \
|
||||||
\
|
\
|
||||||
template <typename U, typename Result> \
|
template <typename U, typename Result> \
|
||||||
struct return_value_check \
|
struct return_value_check \
|
||||||
|
|||||||
@@ -28,9 +28,9 @@ namespace beast {
|
|||||||
template <bool IsConst, class T>
|
template <bool IsConst, class T>
|
||||||
struct maybe_const
|
struct maybe_const
|
||||||
{
|
{
|
||||||
typedef typename std::conditional <IsConst,
|
using type = typename std::conditional <IsConst,
|
||||||
typename std::remove_const <T>::type const,
|
typename std::remove_const <T>::type const,
|
||||||
typename std::remove_const <T>::type>::type type;
|
typename std::remove_const <T>::type>::type;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Alias for omitting `typename`. */
|
/** Alias for omitting `typename`. */
|
||||||
|
|||||||
@@ -53,8 +53,8 @@ private:
|
|||||||
Int m_value;
|
Int m_value;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef Int value_type;
|
using value_type = Int;
|
||||||
typedef Tag tag_type;
|
using tag_type = Tag;
|
||||||
|
|
||||||
tagged_integer() = default;
|
tagged_integer() = default;
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public:
|
|||||||
class test1
|
class test1
|
||||||
: private empty_base_optimization<T>
|
: private empty_base_optimization<T>
|
||||||
{
|
{
|
||||||
typedef empty_base_optimization<T> Base;
|
using Base = empty_base_optimization<T>;
|
||||||
void* m_p;
|
void* m_p;
|
||||||
public:
|
public:
|
||||||
explicit test1 (T const& t)
|
explicit test1 (T const& t)
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public:
|
|||||||
struct Case
|
struct Case
|
||||||
{
|
{
|
||||||
enum { count = N };
|
enum { count = N };
|
||||||
typedef Tag type;
|
using type = Tag;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Counts
|
struct Counts
|
||||||
|
|||||||
@@ -35,9 +35,9 @@ private:
|
|||||||
struct Tag1 { };
|
struct Tag1 { };
|
||||||
struct Tag2 { };
|
struct Tag2 { };
|
||||||
|
|
||||||
typedef tagged_integer <std::uint32_t, Tag1> TagInt1;
|
using TagInt1 = tagged_integer <std::uint32_t, Tag1>;
|
||||||
typedef tagged_integer <std::uint32_t, Tag2> TagInt2;
|
using TagInt2 = tagged_integer <std::uint32_t, Tag2>;
|
||||||
typedef tagged_integer <std::uint64_t, Tag1> TagInt3;
|
using TagInt3 = tagged_integer <std::uint64_t, Tag1>;
|
||||||
|
|
||||||
// Check construction of tagged_integers
|
// Check construction of tagged_integers
|
||||||
static_assert (std::is_constructible<TagInt1, std::uint32_t>::value,
|
static_assert (std::is_constructible<TagInt1, std::uint32_t>::value,
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ template <typename T>
|
|||||||
std::string
|
std::string
|
||||||
type_name()
|
type_name()
|
||||||
{
|
{
|
||||||
typedef typename std::remove_reference<T>::type TR;
|
using TR = typename std::remove_reference<T>::type;
|
||||||
std::unique_ptr<char, void(*)(void*)> own (
|
std::unique_ptr<char, void(*)(void*)> own (
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
abi::__cxa_demangle (typeid(TR).name(), nullptr,
|
abi::__cxa_demangle (typeid(TR).name(), nullptr,
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ class weak_binder
|
|||||||
: private beast::empty_base_optimization<Policy>
|
: private beast::empty_base_optimization<Policy>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
typedef R (T::*member_type)(Args...);
|
using member_type = R (T::*)(Args...);
|
||||||
using pointer_type = std::weak_ptr<T>;
|
using pointer_type = std::weak_ptr<T>;
|
||||||
using shared_type = std::shared_ptr<T>;
|
using shared_type = std::shared_ptr<T>;
|
||||||
member_type member_;
|
member_type member_;
|
||||||
|
|||||||
@@ -43,11 +43,11 @@ namespace ripple {
|
|||||||
class AcceptedLedger
|
class AcceptedLedger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::shared_ptr<AcceptedLedger> pointer;
|
using pointer = std::shared_ptr<AcceptedLedger>;
|
||||||
typedef const pointer& ret;
|
using ret = const pointer&;
|
||||||
typedef std::map<int, AcceptedLedgerTx::pointer> map_t; // Must be an ordered map!
|
using map_t = std::map<int, AcceptedLedgerTx::pointer>; // Must be an ordered map!
|
||||||
typedef map_t::value_type value_type;
|
using value_type = map_t::value_type;
|
||||||
typedef map_t::const_iterator const_iterator;
|
using const_iterator = map_t::const_iterator;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static pointer makeAcceptedLedger (Ledger::ref ledger);
|
static pointer makeAcceptedLedger (Ledger::ref ledger);
|
||||||
|
|||||||
@@ -46,8 +46,8 @@ namespace ripple {
|
|||||||
class AcceptedLedgerTx
|
class AcceptedLedgerTx
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::shared_ptr <AcceptedLedgerTx> pointer;
|
using pointer = std::shared_ptr <AcceptedLedgerTx>;
|
||||||
typedef const pointer& ref;
|
using ref = const pointer&;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AcceptedLedgerTx (Ledger::ref ledger, SerialIter& sit);
|
AcceptedLedgerTx (Ledger::ref ledger, SerialIter& sit);
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ namespace ripple {
|
|||||||
class BookListeners
|
class BookListeners
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::shared_ptr<BookListeners> pointer;
|
using pointer = std::shared_ptr<BookListeners>;
|
||||||
|
|
||||||
BookListeners () {}
|
BookListeners () {}
|
||||||
|
|
||||||
@@ -38,8 +38,8 @@ public:
|
|||||||
void publish (Json::Value const& jvObj);
|
void publish (Json::Value const& jvObj);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef RippleRecursiveMutex LockType;
|
using LockType = RippleRecursiveMutex;
|
||||||
typedef std::lock_guard <LockType> ScopedLockType;
|
using ScopedLockType = std::lock_guard <LockType>;
|
||||||
LockType mLock;
|
LockType mLock;
|
||||||
|
|
||||||
hash_map<std::uint64_t, InfoSub::wptr> mListeners;
|
hash_map<std::uint64_t, InfoSub::wptr> mListeners;
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace ripple {
|
|||||||
class ConsensusTransSetSF : public SHAMapSyncFilter
|
class ConsensusTransSetSF : public SHAMapSyncFilter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef TaggedCache <uint256, Blob> NodeCache;
|
using NodeCache = TaggedCache <uint256, Blob>;
|
||||||
|
|
||||||
// VFALCO TODO Use a dependency injection to get the temp node cache
|
// VFALCO TODO Use a dependency injection to get the temp node cache
|
||||||
ConsensusTransSetSF (NodeCache& nodeCache);
|
ConsensusTransSetSF (NodeCache& nodeCache);
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ namespace ripple {
|
|||||||
class DisputedTx
|
class DisputedTx
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::shared_ptr <DisputedTx> pointer;
|
using pointer = std::shared_ptr <DisputedTx>;
|
||||||
|
|
||||||
DisputedTx (uint256 const& txID,
|
DisputedTx (uint256 const& txID,
|
||||||
Blob const& tx,
|
Blob const& tx,
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ class InboundLedger
|
|||||||
public:
|
public:
|
||||||
static char const* getCountedObjectName () { return "InboundLedger"; }
|
static char const* getCountedObjectName () { return "InboundLedger"; }
|
||||||
|
|
||||||
typedef std::shared_ptr <InboundLedger> pointer;
|
using pointer = std::shared_ptr <InboundLedger>;
|
||||||
typedef std::pair < std::weak_ptr<Peer>, std::shared_ptr<protocol::TMLedgerData> > PeerDataPairType;
|
using PeerDataPairType = std::pair < std::weak_ptr<Peer>, std::shared_ptr<protocol::TMLedgerData> >;
|
||||||
|
|
||||||
// These are the reasons we might acquire a ledger
|
// These are the reasons we might acquire a ledger
|
||||||
enum fcReason
|
enum fcReason
|
||||||
@@ -98,7 +98,7 @@ public:
|
|||||||
|
|
||||||
bool gotData (std::weak_ptr<Peer>, std::shared_ptr<protocol::TMLedgerData>);
|
bool gotData (std::weak_ptr<Peer>, std::shared_ptr<protocol::TMLedgerData>);
|
||||||
|
|
||||||
typedef std::pair <protocol::TMGetObjectByHash::ObjectType, uint256> neededHash_t;
|
using neededHash_t = std::pair <protocol::TMGetObjectByHash::ObjectType, uint256>;
|
||||||
|
|
||||||
std::vector<neededHash_t> getNeededHashes ();
|
std::vector<neededHash_t> getNeededHashes ();
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ private:
|
|||||||
DecayWindow<30, clock_type> fetchRate_;
|
DecayWindow<30, clock_type> fetchRate_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef std::pair<uint256, InboundLedger::pointer> u256_acq_pair;
|
using u256_acq_pair = std::pair<uint256, InboundLedger::pointer>;
|
||||||
// How long before we try again to acquire the same ledger
|
// How long before we try again to acquire the same ledger
|
||||||
static const int kReacquireIntervalSeconds = 300;
|
static const int kReacquireIntervalSeconds = 300;
|
||||||
|
|
||||||
@@ -381,10 +381,10 @@ public:
|
|||||||
private:
|
private:
|
||||||
clock_type& m_clock;
|
clock_type& m_clock;
|
||||||
|
|
||||||
typedef hash_map <uint256, InboundLedger::pointer> MapType;
|
using MapType = hash_map <uint256, InboundLedger::pointer>;
|
||||||
|
|
||||||
typedef RippleRecursiveMutex LockType;
|
using LockType = RippleRecursiveMutex;
|
||||||
typedef std::unique_lock <LockType> ScopedLockType;
|
using ScopedLockType = std::unique_lock <LockType>;
|
||||||
LockType mLock;
|
LockType mLock;
|
||||||
|
|
||||||
MapType mLedgers;
|
MapType mLedgers;
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ namespace ripple {
|
|||||||
class InboundLedgers
|
class InboundLedgers
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef beast::abstract_clock <std::chrono::steady_clock> clock_type;
|
using clock_type = beast::abstract_clock <std::chrono::steady_clock>;
|
||||||
|
|
||||||
virtual ~InboundLedgers() = 0;
|
virtual ~InboundLedgers() = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -79,8 +79,8 @@ class Ledger
|
|||||||
public:
|
public:
|
||||||
static char const* getCountedObjectName () { return "Ledger"; }
|
static char const* getCountedObjectName () { return "Ledger"; }
|
||||||
|
|
||||||
typedef std::shared_ptr<Ledger> pointer;
|
using pointer = std::shared_ptr<Ledger>;
|
||||||
typedef const std::shared_ptr<Ledger>& ref;
|
using ref = const std::shared_ptr<Ledger>&;
|
||||||
|
|
||||||
enum TransResult
|
enum TransResult
|
||||||
{
|
{
|
||||||
@@ -333,7 +333,7 @@ public:
|
|||||||
|
|
||||||
// Ledger hash table function
|
// Ledger hash table function
|
||||||
uint256 getLedgerHash (std::uint32_t ledgerIndex);
|
uint256 getLedgerHash (std::uint32_t ledgerIndex);
|
||||||
typedef std::vector<std::pair<std::uint32_t, uint256>> LedgerHashes;
|
using LedgerHashes = std::vector<std::pair<std::uint32_t, uint256>>;
|
||||||
LedgerHashes getLedgerHashes () const;
|
LedgerHashes getLedgerHashes () const;
|
||||||
|
|
||||||
std::vector<uint256> getLedgerAmendments () const;
|
std::vector<uint256> getLedgerAmendments () const;
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public:
|
|||||||
int failures; // Number of errors encountered since last success
|
int failures; // Number of errors encountered since last success
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef beast::SharedData <State> SharedState;
|
using SharedState = beast::SharedData <State>;
|
||||||
|
|
||||||
SharedState m_state;
|
SharedState m_state;
|
||||||
beast::Journal m_journal;
|
beast::Journal m_journal;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user