mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-22 03:55: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);
|
||||
}
|
||||
|
||||
/** This typedef can be used to get the type of the heapblock's elements. */
|
||||
typedef ElementType Type;
|
||||
/** This type alias can be used to get the type of the heapblock's elements. */
|
||||
using Type = ElementType;
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
|
||||
@@ -41,7 +41,7 @@ template <class DeducedHandler, class... Args>
|
||||
class bound_handler
|
||||
{
|
||||
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;
|
||||
args_type m_args;
|
||||
@@ -54,7 +54,7 @@ private:
|
||||
}
|
||||
|
||||
public:
|
||||
typedef void result_type;
|
||||
using result_type = void;
|
||||
|
||||
explicit
|
||||
bound_handler (DeducedHandler&& handler, Args&&... args)
|
||||
|
||||
@@ -36,8 +36,8 @@ template <class Clock>
|
||||
class io_latency_probe
|
||||
{
|
||||
private:
|
||||
typedef typename Clock::duration duration;
|
||||
typedef typename Clock::time_point time_point;
|
||||
using duration = typename Clock::duration;
|
||||
using time_point = typename Clock::time_point;
|
||||
|
||||
std::recursive_mutex m_mutex;
|
||||
std::condition_variable_any m_cond;
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace beast {
|
||||
// use boost, and then switch to std::error_code when
|
||||
// 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
|
||||
work cleanly.
|
||||
*/
|
||||
typedef double value_type;
|
||||
using value_type = double;
|
||||
|
||||
//==============================================================================
|
||||
/** Creates a RelativeTime.
|
||||
|
||||
@@ -39,13 +39,13 @@ template <class T, class U,
|
||||
bool = std::is_const <std::remove_reference_t <T>>::value>
|
||||
struct apply_const
|
||||
{
|
||||
typedef U type;
|
||||
using type = U;
|
||||
};
|
||||
|
||||
template <class T, class U>
|
||||
struct apply_const <T, U, true>
|
||||
{
|
||||
typedef const U type;
|
||||
using type = const U;
|
||||
};
|
||||
|
||||
// is_contiguous is true if C is a contiguous container
|
||||
@@ -161,7 +161,7 @@ private:
|
||||
void
|
||||
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,
|
||||
"Cannot convert from 'U const' to 'T', "
|
||||
@@ -190,17 +190,17 @@ private:
|
||||
}
|
||||
|
||||
public:
|
||||
typedef T value_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef T& reference;
|
||||
typedef T const& const_reference;
|
||||
typedef T* pointer;
|
||||
typedef T const* const_pointer;
|
||||
typedef T* iterator;
|
||||
typedef T const* const_iterator;
|
||||
typedef std::reverse_iterator <iterator> reverse_iterator;
|
||||
typedef std::reverse_iterator <const_iterator> const_reverse_iterator;
|
||||
using value_type = T;
|
||||
using size_type = std::size_t;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
using reference = T&;
|
||||
using const_reference = T const&;
|
||||
using pointer = T*;
|
||||
using const_pointer = T const*;
|
||||
using iterator = T*;
|
||||
using const_iterator = T const*;
|
||||
using reverse_iterator = std::reverse_iterator <iterator>;
|
||||
using const_reverse_iterator = std::reverse_iterator <const_iterator>;
|
||||
|
||||
// default construct
|
||||
buffer_view () noexcept
|
||||
|
||||
@@ -30,7 +30,7 @@ template <class Container>
|
||||
class const_container
|
||||
{
|
||||
private:
|
||||
typedef Container cont_type;
|
||||
using cont_type = Container;
|
||||
|
||||
cont_type m_cont;
|
||||
|
||||
@@ -46,11 +46,11 @@ protected:
|
||||
}
|
||||
|
||||
public:
|
||||
typedef typename cont_type::value_type value_type;
|
||||
typedef typename cont_type::size_type size_type;
|
||||
typedef typename cont_type::difference_type difference_type;
|
||||
typedef typename cont_type::const_iterator iterator;
|
||||
typedef typename cont_type::const_iterator const_iterator;
|
||||
using value_type = typename cont_type::value_type;
|
||||
using size_type = typename cont_type::size_type;
|
||||
using difference_type = typename cont_type::difference_type;
|
||||
using iterator = typename cont_type::const_iterator;
|
||||
using const_iterator = typename cont_type::const_iterator;
|
||||
|
||||
/** Returns `true` if the container is empty. */
|
||||
bool
|
||||
|
||||
@@ -61,7 +61,7 @@ struct cyclic_iterator_category<
|
||||
std::forward_iterator_tag
|
||||
>
|
||||
{
|
||||
typedef std::forward_iterator_tag type;
|
||||
using type = std::forward_iterator_tag;
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -69,7 +69,7 @@ struct cyclic_iterator_category<
|
||||
std::bidirectional_iterator_tag
|
||||
>
|
||||
{
|
||||
typedef std::bidirectional_iterator_tag type;
|
||||
using type = std::bidirectional_iterator_tag;
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -77,7 +77,7 @@ struct cyclic_iterator_category<
|
||||
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
|
||||
{
|
||||
typedef boost::iterator_facade<
|
||||
using type = boost::iterator_facade<
|
||||
cyclic_iterator<
|
||||
ContainerIterator
|
||||
>,
|
||||
@@ -109,7 +109,7 @@ struct cyclic_iterator_base
|
||||
typename std::iterator_traits<
|
||||
ContainerIterator
|
||||
>::reference
|
||||
> type;
|
||||
>;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -153,39 +153,39 @@ public:
|
||||
/**
|
||||
\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
|
||||
>::type base_type;
|
||||
>::type;
|
||||
|
||||
/**
|
||||
\brief The underlying iterator type
|
||||
*/
|
||||
typedef ContainerIterator container_iterator_type;
|
||||
using container_iterator_type = 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
|
||||
*/
|
||||
typedef typename base_type::reference reference;
|
||||
using reference = typename base_type::reference;
|
||||
|
||||
/**
|
||||
\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
|
||||
*/
|
||||
typedef typename base_type::difference_type difference_type;
|
||||
using difference_type = typename base_type::difference_type;
|
||||
|
||||
/**
|
||||
\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
|
||||
|
||||
@@ -249,7 +249,7 @@ private:
|
||||
};
|
||||
|
||||
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 <
|
||||
IsMulti,
|
||||
|
||||
@@ -113,14 +113,14 @@ public:
|
||||
template <class T>
|
||||
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>
|
||||
struct rebind
|
||||
{
|
||||
typedef AllocT <U> other;
|
||||
using other = AllocT <U>;
|
||||
};
|
||||
|
||||
explicit AllocT (int)
|
||||
@@ -170,8 +170,8 @@ public:
|
||||
class MaybeUnordered : public Base
|
||||
{
|
||||
public:
|
||||
typedef std::less <typename Base::Key> Comp;
|
||||
typedef CompT <typename Base::Key> MyComp;
|
||||
using Comp = std::less <typename Base::Key>;
|
||||
using MyComp = CompT <typename Base::Key>;
|
||||
|
||||
protected:
|
||||
static std::string name_ordered_part()
|
||||
@@ -185,10 +185,10 @@ public:
|
||||
class MaybeUnordered <Base, true> : public Base
|
||||
{
|
||||
public:
|
||||
typedef std::hash <typename Base::Key> Hash;
|
||||
typedef std::equal_to <typename Base::Key> Equal;
|
||||
typedef HashT <typename Base::Key> MyHash;
|
||||
typedef EqualT <typename Base::Key> MyEqual;
|
||||
using Hash = std::hash <typename Base::Key>;
|
||||
using Equal = std::equal_to <typename Base::Key>;
|
||||
using MyHash = HashT <typename Base::Key>;
|
||||
using MyEqual = EqualT <typename Base::Key>;
|
||||
|
||||
protected:
|
||||
static std::string name_ordered_part()
|
||||
@@ -226,9 +226,9 @@ public:
|
||||
class MaybeMap : public Base
|
||||
{
|
||||
public:
|
||||
typedef void T;
|
||||
typedef typename Base::Key Value;
|
||||
typedef std::vector <Value> Values;
|
||||
using T = void;
|
||||
using Value = typename Base::Key;
|
||||
using Values = std::vector <Value>;
|
||||
|
||||
static typename Base::Key const& extract (Value const& value)
|
||||
{
|
||||
@@ -259,9 +259,9 @@ public:
|
||||
class MaybeMap <Base, true> : public Base
|
||||
{
|
||||
public:
|
||||
typedef int T;
|
||||
typedef std::pair <typename Base::Key, T> Value;
|
||||
typedef std::vector <Value> Values;
|
||||
using T = int;
|
||||
using Value = std::pair <typename Base::Key, T>;
|
||||
using Values = std::vector <Value>;
|
||||
|
||||
static typename Base::Key const& extract (Value const& value)
|
||||
{
|
||||
@@ -326,9 +326,9 @@ public:
|
||||
|
||||
struct TestTraitsBase
|
||||
{
|
||||
typedef std::string Key;
|
||||
typedef std::chrono::steady_clock Clock;
|
||||
typedef manual_clock<Clock> ManualClock;
|
||||
using Key = std::string;
|
||||
using Clock = std::chrono::steady_clock;
|
||||
using ManualClock = manual_clock<Clock>;
|
||||
};
|
||||
|
||||
template <bool IsUnordered, bool IsMulti, bool IsMap>
|
||||
@@ -337,18 +337,18 @@ public:
|
||||
TestTraitsBase, IsMap>, IsMulti>, IsUnordered>
|
||||
{
|
||||
private:
|
||||
typedef MaybeUnordered <MaybeMulti <MaybeMap <
|
||||
TestTraitsBase, IsMap>, IsMulti>, IsUnordered> Base;
|
||||
using Base = MaybeUnordered <MaybeMulti <MaybeMap <
|
||||
TestTraitsBase, IsMap>, IsMulti>, IsUnordered>;
|
||||
|
||||
public:
|
||||
using typename Base::Key;
|
||||
|
||||
typedef std::integral_constant <bool, IsUnordered> is_unordered;
|
||||
typedef std::integral_constant <bool, IsMulti> is_multi;
|
||||
typedef std::integral_constant <bool, IsMap> is_map;
|
||||
using is_unordered = std::integral_constant <bool, IsUnordered>;
|
||||
using is_multi = std::integral_constant <bool, IsMulti>;
|
||||
using is_map = std::integral_constant <bool, IsMap>;
|
||||
|
||||
typedef std::allocator <typename Base::Value> Alloc;
|
||||
typedef AllocT <typename Base::Value> MyAlloc;
|
||||
using Alloc = std::allocator <typename Base::Value>;
|
||||
using MyAlloc = AllocT <typename Base::Value>;
|
||||
|
||||
static std::string name()
|
||||
{
|
||||
@@ -645,13 +645,13 @@ typename std::enable_if <
|
||||
aged_associative_container_test_base::
|
||||
checkUnorderedContentsRefRef (C&& c, Values const& v)
|
||||
{
|
||||
typedef typename std::remove_reference <C>::type Cont;
|
||||
typedef TestTraits <
|
||||
using Cont = typename std::remove_reference <C>::type;
|
||||
using Traits = TestTraits <
|
||||
Cont::is_unordered::value,
|
||||
Cont::is_multi::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 key_eq (c.key_eq());
|
||||
for (size_type i (0); i < c.bucket_count(); ++i)
|
||||
@@ -679,13 +679,13 @@ void
|
||||
aged_associative_container_test_base::
|
||||
checkContentsRefRef (C&& c, Values const& v)
|
||||
{
|
||||
typedef typename std::remove_reference <C>::type Cont;
|
||||
typedef TestTraits <
|
||||
using Cont = typename std::remove_reference <C>::type;
|
||||
using Traits = TestTraits <
|
||||
Cont::is_unordered::value,
|
||||
Cont::is_multi::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 (size_type (std::distance (
|
||||
@@ -719,12 +719,12 @@ void
|
||||
aged_associative_container_test_base::
|
||||
checkContents (Cont& c)
|
||||
{
|
||||
typedef TestTraits <
|
||||
using Traits = TestTraits <
|
||||
Cont::is_unordered::value,
|
||||
Cont::is_multi::value,
|
||||
Cont::is_map::value
|
||||
> Traits;
|
||||
typedef typename Traits::Values Values;
|
||||
>;
|
||||
using Values = typename Traits::Values;
|
||||
checkContents (c, Values());
|
||||
}
|
||||
|
||||
@@ -740,15 +740,15 @@ typename std::enable_if <! IsUnordered>::type
|
||||
aged_associative_container_test_base::
|
||||
testConstructEmpty ()
|
||||
{
|
||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
||||
typedef typename Traits::Value Value;
|
||||
typedef typename Traits::Key Key;
|
||||
typedef typename Traits::T T;
|
||||
typedef typename Traits::Clock Clock;
|
||||
typedef typename Traits::Comp Comp;
|
||||
typedef typename Traits::Alloc Alloc;
|
||||
typedef typename Traits::MyComp MyComp;
|
||||
typedef typename Traits::MyAlloc MyAlloc;
|
||||
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||
using Value = typename Traits::Value;
|
||||
using Key = typename Traits::Key;
|
||||
using T = typename Traits::T;
|
||||
using Clock = typename Traits::Clock;
|
||||
using Comp = typename Traits::Comp;
|
||||
using Alloc = typename Traits::Alloc;
|
||||
using MyComp = typename Traits::MyComp;
|
||||
using MyAlloc = typename Traits::MyAlloc;
|
||||
typename Traits::ManualClock clock;
|
||||
|
||||
//testcase (Traits::name() + " empty");
|
||||
@@ -785,17 +785,17 @@ typename std::enable_if <IsUnordered>::type
|
||||
aged_associative_container_test_base::
|
||||
testConstructEmpty ()
|
||||
{
|
||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
||||
typedef typename Traits::Value Value;
|
||||
typedef typename Traits::Key Key;
|
||||
typedef typename Traits::T T;
|
||||
typedef typename Traits::Clock Clock;
|
||||
typedef typename Traits::Hash Hash;
|
||||
typedef typename Traits::Equal Equal;
|
||||
typedef typename Traits::Alloc Alloc;
|
||||
typedef typename Traits::MyHash MyHash;
|
||||
typedef typename Traits::MyEqual MyEqual;
|
||||
typedef typename Traits::MyAlloc MyAlloc;
|
||||
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||
using Value = typename Traits::Value;
|
||||
using Key = typename Traits::Key;
|
||||
using T = typename Traits::T;
|
||||
using Clock = typename Traits::Clock;
|
||||
using Hash = typename Traits::Hash;
|
||||
using Equal = typename Traits::Equal;
|
||||
using Alloc = typename Traits::Alloc;
|
||||
using MyHash = typename Traits::MyHash;
|
||||
using MyEqual = typename Traits::MyEqual;
|
||||
using MyAlloc = typename Traits::MyAlloc;
|
||||
typename Traits::ManualClock clock;
|
||||
|
||||
//testcase (Traits::name() + " empty");
|
||||
@@ -855,15 +855,15 @@ typename std::enable_if <! IsUnordered>::type
|
||||
aged_associative_container_test_base::
|
||||
testConstructRange ()
|
||||
{
|
||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
||||
typedef typename Traits::Value Value;
|
||||
typedef typename Traits::Key Key;
|
||||
typedef typename Traits::T T;
|
||||
typedef typename Traits::Clock Clock;
|
||||
typedef typename Traits::Comp Comp;
|
||||
typedef typename Traits::Alloc Alloc;
|
||||
typedef typename Traits::MyComp MyComp;
|
||||
typedef typename Traits::MyAlloc MyAlloc;
|
||||
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||
using Value = typename Traits::Value;
|
||||
using Key = typename Traits::Key;
|
||||
using T = typename Traits::T;
|
||||
using Clock = typename Traits::Clock;
|
||||
using Comp = typename Traits::Comp;
|
||||
using Alloc = typename Traits::Alloc;
|
||||
using MyComp = typename Traits::MyComp;
|
||||
using MyAlloc = typename Traits::MyAlloc;
|
||||
typename Traits::ManualClock clock;
|
||||
auto const v (Traits::values());
|
||||
|
||||
@@ -918,17 +918,17 @@ typename std::enable_if <IsUnordered>::type
|
||||
aged_associative_container_test_base::
|
||||
testConstructRange ()
|
||||
{
|
||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
||||
typedef typename Traits::Value Value;
|
||||
typedef typename Traits::Key Key;
|
||||
typedef typename Traits::T T;
|
||||
typedef typename Traits::Clock Clock;
|
||||
typedef typename Traits::Hash Hash;
|
||||
typedef typename Traits::Equal Equal;
|
||||
typedef typename Traits::Alloc Alloc;
|
||||
typedef typename Traits::MyHash MyHash;
|
||||
typedef typename Traits::MyEqual MyEqual;
|
||||
typedef typename Traits::MyAlloc MyAlloc;
|
||||
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||
using Value = typename Traits::Value;
|
||||
using Key = typename Traits::Key;
|
||||
using T = typename Traits::T;
|
||||
using Clock = typename Traits::Clock;
|
||||
using Hash = typename Traits::Hash;
|
||||
using Equal = typename Traits::Equal;
|
||||
using Alloc = typename Traits::Alloc;
|
||||
using MyHash = typename Traits::MyHash;
|
||||
using MyEqual = typename Traits::MyEqual;
|
||||
using MyAlloc = typename Traits::MyAlloc;
|
||||
typename Traits::ManualClock clock;
|
||||
auto const v (Traits::values());
|
||||
|
||||
@@ -998,15 +998,15 @@ typename std::enable_if <! IsUnordered>::type
|
||||
aged_associative_container_test_base::
|
||||
testConstructInitList ()
|
||||
{
|
||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
||||
typedef typename Traits::Value Value;
|
||||
typedef typename Traits::Key Key;
|
||||
typedef typename Traits::T T;
|
||||
typedef typename Traits::Clock Clock;
|
||||
typedef typename Traits::Comp Comp;
|
||||
typedef typename Traits::Alloc Alloc;
|
||||
typedef typename Traits::MyComp MyComp;
|
||||
typedef typename Traits::MyAlloc MyAlloc;
|
||||
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||
using Value = typename Traits::Value;
|
||||
using Key = typename Traits::Key;
|
||||
using T = typename Traits::T;
|
||||
using Clock = typename Traits::Clock;
|
||||
using Comp = typename Traits::Comp;
|
||||
using Alloc = typename Traits::Alloc;
|
||||
using MyComp = typename Traits::MyComp;
|
||||
using MyAlloc = typename Traits::MyAlloc;
|
||||
typename Traits::ManualClock clock;
|
||||
|
||||
//testcase (Traits::name() + " init-list");
|
||||
@@ -1023,17 +1023,17 @@ typename std::enable_if <IsUnordered>::type
|
||||
aged_associative_container_test_base::
|
||||
testConstructInitList ()
|
||||
{
|
||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
||||
typedef typename Traits::Value Value;
|
||||
typedef typename Traits::Key Key;
|
||||
typedef typename Traits::T T;
|
||||
typedef typename Traits::Clock Clock;
|
||||
typedef typename Traits::Hash Hash;
|
||||
typedef typename Traits::Equal Equal;
|
||||
typedef typename Traits::Alloc Alloc;
|
||||
typedef typename Traits::MyHash MyHash;
|
||||
typedef typename Traits::MyEqual MyEqual;
|
||||
typedef typename Traits::MyAlloc MyAlloc;
|
||||
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||
using Value = typename Traits::Value;
|
||||
using Key = typename Traits::Key;
|
||||
using T = typename Traits::T;
|
||||
using Clock = typename Traits::Clock;
|
||||
using Hash = typename Traits::Hash;
|
||||
using Equal = typename Traits::Equal;
|
||||
using Alloc = typename Traits::Alloc;
|
||||
using MyHash = typename Traits::MyHash;
|
||||
using MyEqual = typename Traits::MyEqual;
|
||||
using MyAlloc = typename Traits::MyAlloc;
|
||||
typename Traits::ManualClock clock;
|
||||
|
||||
//testcase (Traits::name() + " init-list");
|
||||
@@ -1054,9 +1054,9 @@ void
|
||||
aged_associative_container_test_base::
|
||||
testCopyMove ()
|
||||
{
|
||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
||||
typedef typename Traits::Value Value;
|
||||
typedef typename Traits::Alloc Alloc;
|
||||
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||
using Value = typename Traits::Value;
|
||||
using Alloc = typename Traits::Alloc;
|
||||
typename Traits::ManualClock clock;
|
||||
auto const v (Traits::values());
|
||||
|
||||
@@ -1136,9 +1136,9 @@ void
|
||||
aged_associative_container_test_base::
|
||||
testIterator()
|
||||
{
|
||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
||||
typedef typename Traits::Value Value;
|
||||
typedef typename Traits::Alloc Alloc;
|
||||
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||
using Value = typename Traits::Value;
|
||||
using Alloc = typename Traits::Alloc;
|
||||
typename Traits::ManualClock clock;
|
||||
auto const v (Traits::values());
|
||||
|
||||
@@ -1199,9 +1199,9 @@ typename std::enable_if <! IsUnordered>::type
|
||||
aged_associative_container_test_base::
|
||||
testReverseIterator()
|
||||
{
|
||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
||||
typedef typename Traits::Value Value;
|
||||
typedef typename Traits::Alloc Alloc;
|
||||
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||
using Value = typename Traits::Value;
|
||||
using Alloc = typename Traits::Alloc;
|
||||
typename Traits::ManualClock clock;
|
||||
auto const v (Traits::values());
|
||||
|
||||
@@ -1356,7 +1356,7 @@ void
|
||||
aged_associative_container_test_base::
|
||||
testModifiers()
|
||||
{
|
||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
||||
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||
typename Traits::ManualClock clock;
|
||||
auto const v (Traits::values());
|
||||
auto const l (make_list (v));
|
||||
@@ -1416,8 +1416,8 @@ void
|
||||
aged_associative_container_test_base::
|
||||
testChronological ()
|
||||
{
|
||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
||||
typedef typename Traits::Value Value;
|
||||
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||
using Value = typename Traits::Value;
|
||||
typename Traits::ManualClock clock;
|
||||
auto const v (Traits::values());
|
||||
|
||||
@@ -1483,7 +1483,7 @@ typename std::enable_if <IsMap && ! IsMulti>::type
|
||||
aged_associative_container_test_base::
|
||||
testArrayCreate()
|
||||
{
|
||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
||||
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||
typename Traits::ManualClock clock;
|
||||
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.
|
||||
// VFALCO NOTE This is sketchy
|
||||
typedef TestTraitsBase::ManualClock ManualClock;
|
||||
using ManualClock = TestTraitsBase::ManualClock;
|
||||
ManualClock& clk (dynamic_cast <ManualClock&> (c.clock()));
|
||||
clk.set (0);
|
||||
|
||||
@@ -1621,7 +1621,7 @@ void
|
||||
aged_associative_container_test_base::
|
||||
testElementErase ()
|
||||
{
|
||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
||||
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||
|
||||
//testcase (Traits::name() + " element erase"
|
||||
testcase ("element erase");
|
||||
@@ -1751,7 +1751,7 @@ void
|
||||
aged_associative_container_test_base::
|
||||
testRangeErase ()
|
||||
{
|
||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
||||
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||
|
||||
//testcase (Traits::name() + " element erase"
|
||||
testcase ("range erase");
|
||||
@@ -1784,8 +1784,8 @@ typename std::enable_if <! IsUnordered>::type
|
||||
aged_associative_container_test_base::
|
||||
testCompare ()
|
||||
{
|
||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
||||
typedef typename Traits::Value Value;
|
||||
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||
using Value = typename Traits::Value;
|
||||
typename Traits::ManualClock clock;
|
||||
auto const v (Traits::values());
|
||||
|
||||
@@ -1819,7 +1819,7 @@ typename std::enable_if <! IsUnordered>::type
|
||||
aged_associative_container_test_base::
|
||||
testObservers()
|
||||
{
|
||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
||||
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||
typename Traits::ManualClock clock;
|
||||
|
||||
//testcase (Traits::name() + " observers");
|
||||
@@ -1838,7 +1838,7 @@ typename std::enable_if <IsUnordered>::type
|
||||
aged_associative_container_test_base::
|
||||
testObservers()
|
||||
{
|
||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
||||
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||
typename Traits::ManualClock clock;
|
||||
|
||||
//testcase (Traits::name() + " observers");
|
||||
@@ -1862,7 +1862,7 @@ void
|
||||
aged_associative_container_test_base::
|
||||
testMaybeUnorderedMultiMap ()
|
||||
{
|
||||
typedef TestTraits <IsUnordered, IsMulti, IsMap> Traits;
|
||||
using Traits = TestTraits <IsUnordered, IsMulti, IsMap>;
|
||||
|
||||
testConstructEmpty <IsUnordered, IsMulti, IsMap> ();
|
||||
testConstructRange <IsUnordered, IsMulti, IsMap> ();
|
||||
@@ -1886,8 +1886,8 @@ class aged_set_test : public aged_associative_container_test_base
|
||||
public:
|
||||
// Compile time checks
|
||||
|
||||
typedef std::string Key;
|
||||
typedef int T;
|
||||
using Key = std::string;
|
||||
using T = int;
|
||||
|
||||
static_assert (std::is_same <
|
||||
aged_set <Key>,
|
||||
|
||||
@@ -37,7 +37,7 @@ enum
|
||||
};
|
||||
|
||||
/** 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 {
|
||||
struct Context
|
||||
|
||||
@@ -36,7 +36,7 @@ template <>
|
||||
struct equal_to <void>
|
||||
{
|
||||
// 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>
|
||||
auto operator() (T&& lhs, U&& rhs) const ->
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace std {
|
||||
template <class T, T... Ints>
|
||||
struct integer_sequence
|
||||
{
|
||||
typedef T value_type;
|
||||
using value_type = T;
|
||||
static_assert (is_integral<T>::value,
|
||||
"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 <
|
||||
T, N, integer_sequence <T, Indices...>>
|
||||
{
|
||||
typedef typename make_integer_sequence_unchecked<
|
||||
T, N-1, integer_sequence<T, N-1, Indices...>>::type type;
|
||||
using type = typename make_integer_sequence_unchecked<
|
||||
T, N-1, integer_sequence<T, N-1, Indices...>>::type;
|
||||
};
|
||||
|
||||
template <class T, unsigned long long ...Indices>
|
||||
struct make_integer_sequence_unchecked <
|
||||
T, 0, integer_sequence<T, Indices...>>
|
||||
{
|
||||
typedef integer_sequence <T, Indices...> type;
|
||||
using type = integer_sequence <T, Indices...>;
|
||||
};
|
||||
|
||||
template <class T, T N>
|
||||
@@ -90,8 +90,8 @@ struct make_integer_sequence_checked
|
||||
static_assert (N >= 0,
|
||||
"N must be non-negative");
|
||||
|
||||
typedef typename make_integer_sequence_unchecked <
|
||||
T, N, integer_sequence<T>>::type type;
|
||||
using type = typename make_integer_sequence_unchecked <
|
||||
T, N, integer_sequence<T>>::type;
|
||||
};
|
||||
|
||||
} // detail
|
||||
@@ -116,20 +116,20 @@ namespace detail {
|
||||
template <size_t... Ints>
|
||||
struct index_tuple
|
||||
{
|
||||
typedef index_tuple <Ints..., sizeof... (Ints)> next;
|
||||
using next = index_tuple <Ints..., sizeof... (Ints)>;
|
||||
|
||||
};
|
||||
|
||||
template <size_t N>
|
||||
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 <>
|
||||
struct build_index_tuple <0>
|
||||
{
|
||||
typedef index_tuple<> type;
|
||||
using type = index_tuple<>;
|
||||
};
|
||||
|
||||
template <class T, T N,
|
||||
@@ -146,7 +146,7 @@ struct make_integer_sequence <T, N, index_tuple <Ints...>>
|
||||
static_assert (N >= 0,
|
||||
"N must be non-negative");
|
||||
|
||||
typedef integer_sequence <T, static_cast <T> (Ints)...> type;
|
||||
using type = integer_sequence <T, static_cast <T> (Ints)...>;
|
||||
};
|
||||
|
||||
} // detail
|
||||
|
||||
@@ -34,9 +34,9 @@
|
||||
namespace beast {
|
||||
namespace detail {
|
||||
|
||||
typedef std::uint64_t u64;
|
||||
typedef std::uint32_t u32;
|
||||
typedef std::uint8_t u8;
|
||||
using u64 = std::uint64_t;
|
||||
using u32 = std::uint32_t;
|
||||
using u8 = std::uint8_t;
|
||||
|
||||
inline
|
||||
u64
|
||||
|
||||
@@ -235,7 +235,7 @@ private:
|
||||
std::size_t m_seed;
|
||||
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;
|
||||
|
||||
// compress
|
||||
@@ -351,8 +351,8 @@ struct is_contiguously_hashable <hash_append_tests::FastKey>
|
||||
class hash_append_test : public unit_test::suite
|
||||
{
|
||||
public:
|
||||
typedef hash_append_tests::SlowKey SlowKey;
|
||||
typedef hash_append_tests::FastKey FastKey;
|
||||
using SlowKey = hash_append_tests::SlowKey;
|
||||
using FastKey = hash_append_tests::FastKey;
|
||||
|
||||
struct results_t
|
||||
{
|
||||
|
||||
@@ -51,7 +51,7 @@ template <class FwdIter>
|
||||
float
|
||||
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, "");
|
||||
|
||||
const unsigned nbits = CHAR_BIT * sizeof(std::size_t);
|
||||
|
||||
@@ -61,9 +61,9 @@ private:
|
||||
void *data;
|
||||
};
|
||||
|
||||
typedef int (*data_cb_t) (
|
||||
using data_cb_t = int (*) (
|
||||
state_t*, const char *at, size_t length);
|
||||
typedef int (*cb_t) (state_t*);
|
||||
using cb_t = int (*) (state_t*);
|
||||
|
||||
struct hooks_t
|
||||
{
|
||||
@@ -87,7 +87,7 @@ private:
|
||||
std::string value_;
|
||||
|
||||
public:
|
||||
typedef boost::system::error_code error_code;
|
||||
using error_code = boost::system::error_code;
|
||||
|
||||
virtual
|
||||
~basic_parser() = default;
|
||||
|
||||
@@ -35,13 +35,13 @@ namespace http {
|
||||
class body
|
||||
{
|
||||
private:
|
||||
typedef boost::asio::streambuf buffer_type;
|
||||
using buffer_type = boost::asio::streambuf;
|
||||
|
||||
// Hack: use unique_ptr because streambuf cant be moved
|
||||
std::unique_ptr <buffer_type> buf_;
|
||||
|
||||
public:
|
||||
typedef buffer_type::const_buffers_type const_buffers_type;
|
||||
using const_buffers_type = buffer_type::const_buffers_type;
|
||||
|
||||
body();
|
||||
body (body&& other);
|
||||
|
||||
@@ -37,9 +37,9 @@ template <class Allocator = std::allocator <char>>
|
||||
using basic_field_string =
|
||||
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.
|
||||
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>
|
||||
>::type list_t;
|
||||
>::type;
|
||||
|
||||
typedef boost::intrusive::make_set <element,
|
||||
using set_t = boost::intrusive::make_set <element,
|
||||
boost::intrusive::constant_time_size <true>
|
||||
>::type set_t;
|
||||
>::type;
|
||||
|
||||
list_t list_;
|
||||
set_t set_;
|
||||
|
||||
public:
|
||||
typedef boost::transform_iterator <transform,
|
||||
list_t::const_iterator> iterator;
|
||||
typedef iterator const_iterator;
|
||||
using iterator = boost::transform_iterator <transform,
|
||||
list_t::const_iterator>;
|
||||
using const_iterator = iterator;
|
||||
|
||||
~headers()
|
||||
{
|
||||
|
||||
@@ -128,9 +128,9 @@ save certain data for later usage, you can do that from the 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.
|
||||
* 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,
|
||||
(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
|
||||
{
|
||||
private:
|
||||
typedef boost::system::error_code error_code;
|
||||
typedef boost::system::error_condition error_condition;
|
||||
using error_code = boost::system::error_code;
|
||||
using error_condition = boost::system::error_condition;
|
||||
|
||||
public:
|
||||
char const*
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace http {
|
||||
class raw_parser
|
||||
{
|
||||
private:
|
||||
typedef boost::system::error_code error_code;
|
||||
using error_code = boost::system::error_code;
|
||||
|
||||
public:
|
||||
enum message_type
|
||||
@@ -174,9 +174,9 @@ private:
|
||||
void *data;
|
||||
};
|
||||
|
||||
typedef int (*data_cb_t) (
|
||||
using data_cb_t = int (*) (
|
||||
state_t*, const char *at, size_t length);
|
||||
typedef int (*cb_t) (state_t*);
|
||||
using cb_t = int (*) (state_t*);
|
||||
|
||||
struct hooks_t
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace insight {
|
||||
class BaseImpl
|
||||
{
|
||||
public:
|
||||
typedef std::shared_ptr <BaseImpl> ptr;
|
||||
using ptr = std::shared_ptr <BaseImpl>;
|
||||
|
||||
virtual ~BaseImpl () = 0;
|
||||
};
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace insight {
|
||||
class Collector
|
||||
{
|
||||
public:
|
||||
typedef std::shared_ptr <Collector> ptr;
|
||||
using ptr = std::shared_ptr <Collector>;
|
||||
|
||||
virtual ~Collector() = 0;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace insight {
|
||||
class Counter : public Base
|
||||
{
|
||||
public:
|
||||
typedef CounterImpl::value_type value_type;
|
||||
using value_type = CounterImpl::value_type;
|
||||
|
||||
/** Create a null metric.
|
||||
A null metric reports no information.
|
||||
|
||||
@@ -32,7 +32,7 @@ class CounterImpl
|
||||
, public BaseImpl
|
||||
{
|
||||
public:
|
||||
typedef std::int64_t value_type;
|
||||
using value_type = std::int64_t;
|
||||
|
||||
virtual ~CounterImpl () = 0;
|
||||
virtual void increment (value_type amount) = 0;
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace insight {
|
||||
class Event : public Base
|
||||
{
|
||||
public:
|
||||
typedef EventImpl::value_type value_type;
|
||||
using value_type = EventImpl::value_type;
|
||||
|
||||
/** Create a null metric.
|
||||
A null metric reports no information.
|
||||
|
||||
@@ -32,7 +32,7 @@ class EventImpl
|
||||
, public BaseImpl
|
||||
{
|
||||
public:
|
||||
typedef std::chrono::milliseconds value_type;
|
||||
using value_type = std::chrono::milliseconds;
|
||||
|
||||
virtual ~EventImpl () = 0;
|
||||
virtual void notify (value_type const& value) = 0;
|
||||
|
||||
@@ -40,8 +40,8 @@ namespace insight {
|
||||
class Gauge : public Base
|
||||
{
|
||||
public:
|
||||
typedef GaugeImpl::value_type value_type;
|
||||
typedef GaugeImpl::difference_type difference_type;
|
||||
using value_type = GaugeImpl::value_type;
|
||||
using difference_type = GaugeImpl::difference_type;
|
||||
|
||||
/** Create a null metric.
|
||||
A null metric reports no information.
|
||||
|
||||
@@ -32,8 +32,8 @@ class GaugeImpl
|
||||
, public BaseImpl
|
||||
{
|
||||
public:
|
||||
typedef std::uint64_t value_type;
|
||||
typedef std::int64_t difference_type;
|
||||
using value_type = std::uint64_t;
|
||||
using difference_type = std::int64_t;
|
||||
|
||||
virtual ~GaugeImpl () = 0;
|
||||
virtual void set (value_type value) = 0;
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace insight {
|
||||
class Group : public Collector
|
||||
{
|
||||
public:
|
||||
typedef std::shared_ptr <Group> ptr;
|
||||
using ptr = std::shared_ptr <Group>;
|
||||
|
||||
/** Returns the name of this group, for diagnostics. */
|
||||
virtual std::string const& name () const = 0;
|
||||
|
||||
@@ -30,7 +30,7 @@ class HookImpl
|
||||
, public BaseImpl
|
||||
{
|
||||
public:
|
||||
typedef std::function <void (void)> HandlerType;
|
||||
using HandlerType = std::function <void (void)>;
|
||||
|
||||
virtual ~HookImpl () = 0;
|
||||
};
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace insight {
|
||||
class Meter : public Base
|
||||
{
|
||||
public:
|
||||
typedef MeterImpl::value_type value_type;
|
||||
using value_type = MeterImpl::value_type;
|
||||
|
||||
/** Create a null metric.
|
||||
A null metric reports no information.
|
||||
|
||||
@@ -32,7 +32,7 @@ class MeterImpl
|
||||
, public BaseImpl
|
||||
{
|
||||
public:
|
||||
typedef std::uint64_t value_type;
|
||||
using value_type = std::uint64_t;
|
||||
|
||||
virtual ~MeterImpl () = 0;
|
||||
virtual void increment (value_type amount) = 0;
|
||||
|
||||
@@ -31,7 +31,7 @@ class GroupImp
|
||||
, public Group
|
||||
{
|
||||
public:
|
||||
typedef std::vector <std::shared_ptr <BaseImpl>> Items;
|
||||
using Items = std::vector <std::shared_ptr <BaseImpl>>;
|
||||
|
||||
std::string const m_name;
|
||||
Collector::ptr m_collector;
|
||||
@@ -91,7 +91,7 @@ private:
|
||||
class GroupsImp : public Groups
|
||||
{
|
||||
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;
|
||||
Items m_items;
|
||||
|
||||
@@ -197,7 +197,7 @@ private:
|
||||
List <StatsDMetricBase> metrics;
|
||||
};
|
||||
|
||||
typedef SharedData <StateType> State;
|
||||
using State = SharedData <StateType>;
|
||||
|
||||
Journal m_journal;
|
||||
IP::Endpoint m_address;
|
||||
|
||||
@@ -37,13 +37,13 @@ namespace detail {
|
||||
template <typename T, typename U>
|
||||
struct CopyConst
|
||||
{
|
||||
typedef typename std::remove_const <U>::type type;
|
||||
using type = typename std::remove_const <U>::type;
|
||||
};
|
||||
|
||||
template <typename T, typename 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
|
||||
{
|
||||
private:
|
||||
typedef T value_type;
|
||||
using value_type = T;
|
||||
|
||||
friend class List<T, Tag>;
|
||||
|
||||
@@ -73,11 +73,11 @@ class ListIterator : public std::iterator <
|
||||
std::bidirectional_iterator_tag, std::size_t>
|
||||
{
|
||||
public:
|
||||
typedef typename detail::CopyConst <
|
||||
N, typename N::value_type>::type value_type;
|
||||
typedef value_type* pointer;
|
||||
typedef value_type& reference;
|
||||
typedef std::size_t size_type;
|
||||
using value_type = typename detail::CopyConst <
|
||||
N, typename N::value_type>::type;
|
||||
using pointer = value_type*;
|
||||
using reference = value_type&;
|
||||
using size_type = std::size_t;
|
||||
|
||||
ListIterator (N* node = nullptr) noexcept
|
||||
: m_node (node)
|
||||
@@ -242,8 +242,8 @@ private:
|
||||
struct ProcessTag { };
|
||||
struct UpdateTag { };
|
||||
|
||||
typedef List <Actor, ProcessTag> ProcessList;
|
||||
typedef List <Actor, UpdateTag> UpdateList;
|
||||
using ProcessList = List <Actor, ProcessTag>;
|
||||
using UpdateList = List <Actor, UpdateTag>;
|
||||
|
||||
// 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
|
||||
{
|
||||
public:
|
||||
typedef typename detail::ListNode <T, Tag> Node;
|
||||
using Node = typename detail::ListNode <T, Tag>;
|
||||
|
||||
typedef T value_type;
|
||||
typedef value_type* pointer;
|
||||
typedef value_type& reference;
|
||||
typedef value_type const* const_pointer;
|
||||
typedef value_type const& const_reference;
|
||||
typedef std::size_t size_type;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
using value_type = T;
|
||||
using pointer = value_type*;
|
||||
using reference = value_type&;
|
||||
using const_pointer = value_type const*;
|
||||
using const_reference = value_type const&;
|
||||
using size_type = std::size_t;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
|
||||
typedef detail::ListIterator <Node> iterator;
|
||||
typedef detail::ListIterator <Node const> const_iterator;
|
||||
using iterator = detail::ListIterator <Node>;
|
||||
using const_iterator = detail::ListIterator <Node const>;
|
||||
|
||||
/** Create an empty list. */
|
||||
List ()
|
||||
|
||||
@@ -42,18 +42,18 @@ class LockFreeStackIterator
|
||||
typename Container::reference>::type>
|
||||
{
|
||||
protected:
|
||||
typedef typename Container::Node Node;
|
||||
typedef typename std::conditional <
|
||||
IsConst, Node const*, Node*>::type NodePtr;
|
||||
using Node = typename Container::Node;
|
||||
using NodePtr = typename std::conditional <
|
||||
IsConst, Node const*, Node*>::type;
|
||||
|
||||
public:
|
||||
typedef typename Container::value_type value_type;
|
||||
typedef typename std::conditional <IsConst,
|
||||
using value_type = typename Container::value_type;
|
||||
using pointer = typename std::conditional <IsConst,
|
||||
typename Container::const_pointer,
|
||||
typename Container::pointer>::type pointer;
|
||||
typedef typename std::conditional <IsConst,
|
||||
typename Container::pointer>::type;
|
||||
using reference = typename std::conditional <IsConst,
|
||||
typename Container::const_reference,
|
||||
typename Container::reference>::type reference;
|
||||
typename Container::reference>::type;
|
||||
|
||||
LockFreeStackIterator ()
|
||||
: m_node ()
|
||||
@@ -167,17 +167,17 @@ public:
|
||||
};
|
||||
|
||||
public:
|
||||
typedef Element value_type;
|
||||
typedef Element* pointer;
|
||||
typedef Element& reference;
|
||||
typedef Element const* const_pointer;
|
||||
typedef Element const& const_reference;
|
||||
typedef std::size_t size_type;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef LockFreeStackIterator <
|
||||
LockFreeStack <Element, Tag>, false> iterator;
|
||||
typedef LockFreeStackIterator <
|
||||
LockFreeStack <Element, Tag>, true> const_iterator;
|
||||
using value_type = Element;
|
||||
using pointer = Element*;
|
||||
using reference = Element&;
|
||||
using const_pointer = Element const*;
|
||||
using const_reference = Element const&;
|
||||
using size_type = std::size_t;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
using iterator = LockFreeStackIterator <
|
||||
LockFreeStack <Element, Tag>, false>;
|
||||
using const_iterator = LockFreeStackIterator <
|
||||
LockFreeStack <Element, Tag>, true>;
|
||||
|
||||
LockFreeStack ()
|
||||
: m_end (nullptr)
|
||||
|
||||
@@ -57,7 +57,7 @@ template <typename ElementType,
|
||||
class Array
|
||||
{
|
||||
private:
|
||||
typedef ElementType ParameterType;
|
||||
using ParameterType = ElementType;
|
||||
|
||||
public:
|
||||
//==============================================================================
|
||||
@@ -1021,7 +1021,7 @@ public:
|
||||
inline const TypeOfCriticalSectionToUse& getLock() const noexcept { return data; }
|
||||
|
||||
/** Returns the type of scoped lock to use for locking this array */
|
||||
typedef typename TypeOfCriticalSectionToUse::ScopedLockType ScopedLockType;
|
||||
using ScopedLockType = typename TypeOfCriticalSectionToUse::ScopedLockType;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -180,7 +180,7 @@ template <class ElementType>
|
||||
class DefaultElementComparator
|
||||
{
|
||||
private:
|
||||
typedef ElementType ParameterType;
|
||||
using ParameterType = ElementType;
|
||||
|
||||
public:
|
||||
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
|
||||
{
|
||||
typedef SemanticVersion::identifier_list identifier_list;
|
||||
using identifier_list = SemanticVersion::identifier_list;
|
||||
|
||||
public:
|
||||
void checkPass (std::string const& input, bool shouldPass = true)
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace beast {
|
||||
class SemanticVersion
|
||||
{
|
||||
public:
|
||||
typedef std::vector<std::string> identifier_list;
|
||||
using identifier_list = std::vector<std::string>;
|
||||
|
||||
int majorVersion;
|
||||
int minorVersion;
|
||||
|
||||
@@ -74,8 +74,8 @@ public:
|
||||
#endif
|
||||
|
||||
// Standard container interface
|
||||
typedef char* iterator;
|
||||
typedef char const* const_iterator;
|
||||
using iterator = char*;
|
||||
using const_iterator = char const*;
|
||||
inline iterator begin () noexcept { return static_cast <iterator> (getData ()); }
|
||||
inline iterator end () noexcept { return addBytesToPointer (begin (), size); }
|
||||
inline const_iterator cbegin () const noexcept { return static_cast <const_iterator> (getConstData ()); }
|
||||
|
||||
@@ -104,10 +104,10 @@ namespace
|
||||
{
|
||||
#if BEAST_LINUX || \
|
||||
(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
|
||||
#else
|
||||
typedef struct stat beast_statStruct;
|
||||
using beast_statStruct = struct stat;
|
||||
#define BEAST_STAT stat
|
||||
#endif
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace SystemStats
|
||||
getStackBacktrace();
|
||||
|
||||
/** 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
|
||||
executes some kind of illegal instruction.
|
||||
|
||||
@@ -26,8 +26,8 @@ class DeadlineTimer::Manager
|
||||
: protected Thread
|
||||
{
|
||||
private:
|
||||
typedef CriticalSection LockType;
|
||||
typedef List <DeadlineTimer> Items;
|
||||
using LockType = CriticalSection;
|
||||
using Items = List <DeadlineTimer>;
|
||||
|
||||
public:
|
||||
Manager () : Thread ("DeadlineTimer::Manager")
|
||||
|
||||
@@ -92,13 +92,13 @@ public:
|
||||
|
||||
//==============================================================================
|
||||
/** 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. */
|
||||
typedef GenericScopedUnlock <CriticalSection> ScopedUnlockType;
|
||||
using ScopedUnlockType = GenericScopedUnlock <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. */
|
||||
typedef ScopedLockType ScopedUnlockType;
|
||||
using ScopedUnlockType = ScopedLockType;
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
@@ -187,7 +187,7 @@ public:
|
||||
|
||||
@see CriticalSection, ScopedUnlock
|
||||
*/
|
||||
typedef CriticalSection::ScopedLockType ScopedLock;
|
||||
using ScopedLock = CriticalSection::ScopedLockType;
|
||||
|
||||
//==============================================================================
|
||||
/**
|
||||
@@ -227,7 +227,7 @@ typedef CriticalSection::ScopedLockType 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
|
||||
*/
|
||||
typedef CriticalSection::ScopedTryLockType ScopedTryLock;
|
||||
using ScopedTryLock = CriticalSection::ScopedTryLockType;
|
||||
|
||||
} // beast
|
||||
|
||||
|
||||
@@ -86,8 +86,8 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
typedef CriticalSection MutexType;
|
||||
typedef MutexType::ScopedLockType ScopedLockType;
|
||||
using MutexType = CriticalSection;
|
||||
using ScopedLockType = MutexType::ScopedLockType;
|
||||
|
||||
static StaticDestructor s_staticDestructor;
|
||||
|
||||
|
||||
@@ -92,11 +92,11 @@ namespace TimeHelpers
|
||||
static inline String formatString (const String& format, const struct tm* const tm)
|
||||
{
|
||||
#if BEAST_ANDROID
|
||||
typedef CharPointer_UTF8 StringType;
|
||||
using StringType = CharPointer_UTF8;
|
||||
#elif BEAST_WINDOWS
|
||||
typedef CharPointer_UTF16 StringType;
|
||||
using StringType = CharPointer_UTF16;
|
||||
#else
|
||||
typedef CharPointer_UTF32 StringType;
|
||||
using StringType = CharPointer_UTF32;
|
||||
#endif
|
||||
|
||||
for (size_t bufferSize = 256; ; bufferSize += 256)
|
||||
|
||||
@@ -36,7 +36,7 @@ public:
|
||||
defaultBlocksize = 32 * 1024
|
||||
};
|
||||
|
||||
typedef std::size_t size_type;
|
||||
using size_type = std::size_t;
|
||||
|
||||
/** Create the dynamic buffer with the specified block size. */
|
||||
explicit DynamicBuffer (size_type blocksize = defaultBlocksize);
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
std::string to_string () const;
|
||||
|
||||
private:
|
||||
typedef std::vector <void*> Buffers;
|
||||
using Buffers = std::vector <void*>;
|
||||
|
||||
size_type m_blocksize;
|
||||
size_type m_size;
|
||||
|
||||
@@ -109,8 +109,8 @@ struct AddressV4
|
||||
class Proxy
|
||||
{
|
||||
public:
|
||||
typedef typename std::conditional <
|
||||
IsConst, std::uint32_t const*, std::uint32_t*>::type Pointer;
|
||||
using Pointer = typename std::conditional <
|
||||
IsConst, std::uint32_t const*, std::uint32_t*>::type;
|
||||
|
||||
Proxy (int shift, Pointer value)
|
||||
: m_shift (shift)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
namespace beast {
|
||||
namespace IP {
|
||||
|
||||
typedef std::uint16_t Port;
|
||||
using Port = std::uint16_t;
|
||||
|
||||
/** A version-independent IP address and port combination. */
|
||||
class Endpoint
|
||||
|
||||
@@ -42,9 +42,9 @@ namespace beast {
|
||||
{
|
||||
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..
|
||||
typedef SharedPtr<MyClass> Ptr;
|
||||
using Ptr = SharedPtr<MyClass>;
|
||||
};
|
||||
|
||||
MyClass::Ptr p = new MyClass();
|
||||
|
||||
@@ -48,12 +48,12 @@ namespace beast {
|
||||
reference-countable class by implementing a pair of methods called
|
||||
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.
|
||||
|
||||
@code
|
||||
|
||||
typedef SharedPtr <MyClass> MyClassPtr;
|
||||
using MyClassPtr = SharedPtr <MyClass>;
|
||||
|
||||
@endcode
|
||||
|
||||
@@ -63,10 +63,10 @@ template <class T>
|
||||
class SharedPtr
|
||||
{
|
||||
public:
|
||||
typedef T value_type;
|
||||
using value_type = T;
|
||||
|
||||
/** The class being referenced by this container. */
|
||||
typedef T ReferencedType;
|
||||
using ReferencedType = T;
|
||||
|
||||
/** Construct a container pointing to nothing. */
|
||||
SharedPtr () noexcept
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
namespace beast {
|
||||
|
||||
/** 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
|
||||
{
|
||||
public:
|
||||
typedef std::basic_string <CharT, Traits> string_type;
|
||||
typedef basic_scoped_ostream <CharT, Traits> scoped_stream_type;
|
||||
using string_type = std::basic_string <CharT, Traits>;
|
||||
using scoped_stream_type = basic_scoped_ostream <CharT, Traits>;
|
||||
|
||||
basic_abstract_ostream() = default;
|
||||
|
||||
|
||||
@@ -54,11 +54,11 @@ template <
|
||||
class basic_scoped_ostream
|
||||
{
|
||||
private:
|
||||
typedef std::function <void (
|
||||
std::basic_string <CharT, Traits, Allocator> const&)> handler_t;
|
||||
using handler_t = std::function <void (
|
||||
std::basic_string <CharT, Traits, Allocator> const&)>;
|
||||
|
||||
typedef std::basic_ostringstream <
|
||||
CharT, Traits, Allocator> stream_type;
|
||||
using stream_type = std::basic_ostringstream <
|
||||
CharT, Traits, Allocator>;
|
||||
|
||||
handler_t m_handler;
|
||||
|
||||
@@ -81,7 +81,7 @@ private:
|
||||
#endif
|
||||
|
||||
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
|
||||
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
|
||||
{
|
||||
public:
|
||||
typedef char CharType;
|
||||
using CharType = char;
|
||||
|
||||
inline explicit CharPointer_ASCII (const CharType* const rawPointer) noexcept
|
||||
: data (const_cast <CharType*> (rawPointer))
|
||||
|
||||
@@ -42,9 +42,9 @@ class CharPointer_UTF16
|
||||
{
|
||||
public:
|
||||
#if BEAST_NATIVE_WCHAR_IS_UTF16
|
||||
typedef wchar_t CharType;
|
||||
using CharType = wchar_t;
|
||||
#else
|
||||
typedef std::int16_t CharType;
|
||||
using CharType = std::int16_t;
|
||||
#endif
|
||||
|
||||
inline explicit CharPointer_UTF16 (const CharType* const rawPointer) noexcept
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace beast {
|
||||
class CharPointer_UTF32
|
||||
{
|
||||
public:
|
||||
typedef beast_wchar CharType;
|
||||
using CharType = beast_wchar;
|
||||
|
||||
inline explicit CharPointer_UTF32 (const CharType* const rawPointer) noexcept
|
||||
: data (const_cast <CharType*> (rawPointer))
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace beast {
|
||||
class CharPointer_UTF8
|
||||
{
|
||||
public:
|
||||
typedef char CharType;
|
||||
using CharType = char;
|
||||
|
||||
inline explicit CharPointer_UTF8 (const CharType* const rawPointer) noexcept
|
||||
: data (const_cast <CharType*> (rawPointer))
|
||||
|
||||
@@ -49,9 +49,9 @@ namespace beast {
|
||||
|
||||
#if BEAST_NATIVE_WCHAR_IS_UTF32 || DOXYGEN
|
||||
/** A platform-independent 32-bit unicode character type. */
|
||||
typedef wchar_t beast_wchar;
|
||||
using beast_wchar = wchar_t;
|
||||
#else
|
||||
typedef std::uint32_t beast_wchar;
|
||||
using beast_wchar = std::uint32_t;
|
||||
#endif
|
||||
|
||||
#ifndef DOXYGEN
|
||||
|
||||
@@ -49,11 +49,11 @@
|
||||
namespace beast {
|
||||
|
||||
#if BEAST_NATIVE_WCHAR_IS_UTF8
|
||||
typedef CharPointer_UTF8 CharPointer_wchar_t;
|
||||
using CharPointer_wchar_t = CharPointer_UTF8;
|
||||
#elif BEAST_NATIVE_WCHAR_IS_UTF16
|
||||
typedef CharPointer_UTF16 CharPointer_wchar_t;
|
||||
using CharPointer_wchar_t = CharPointer_UTF16;
|
||||
#else
|
||||
typedef CharPointer_UTF32 CharPointer_wchar_t;
|
||||
using CharPointer_wchar_t = CharPointer_UTF32;
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
@@ -186,7 +186,7 @@ public:
|
||||
static const String empty;
|
||||
|
||||
/** 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. */
|
||||
|
||||
@@ -44,13 +44,13 @@ namespace beast {
|
||||
toUTF32() methods let you access the string's content in any of the other formats.
|
||||
*/
|
||||
#if (BEAST_STRING_UTF_TYPE == 32)
|
||||
typedef CharPointer_UTF32 StringCharPointerType;
|
||||
using StringCharPointerType = CharPointer_UTF32;
|
||||
|
||||
#elif (BEAST_STRING_UTF_TYPE == 16)
|
||||
typedef CharPointer_UTF16 StringCharPointerType;
|
||||
using StringCharPointerType = CharPointer_UTF16;
|
||||
|
||||
#elif (BEAST_STRING_UTF_TYPE == 8)
|
||||
typedef CharPointer_UTF8 StringCharPointerType;
|
||||
using StringCharPointerType = CharPointer_UTF8;
|
||||
|
||||
#else
|
||||
#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;
|
||||
}
|
||||
|
||||
typedef String::CharPointerType CharPointerType;
|
||||
typedef String::CharPointerType::CharType CharType;
|
||||
using CharPointerType = String::CharPointerType;
|
||||
using CharType = String::CharPointerType::CharType;
|
||||
|
||||
//==============================================================================
|
||||
static CharPointerType createUninitialisedBytes (const size_t numBytes)
|
||||
@@ -1872,7 +1872,7 @@ struct StringEncodingConverter
|
||||
{
|
||||
String& source = const_cast <String&> (s);
|
||||
|
||||
typedef typename CharPointerType_Dest::CharType DestChar;
|
||||
using DestChar = typename CharPointerType_Dest::CharType;
|
||||
|
||||
if (source.isEmpty())
|
||||
return CharPointerType_Dest (reinterpret_cast <const DestChar*> (&emptyChar));
|
||||
|
||||
@@ -39,9 +39,9 @@ namespace beast {
|
||||
class RecursiveMutex
|
||||
{
|
||||
public:
|
||||
typedef std::lock_guard <RecursiveMutex> ScopedLockType;
|
||||
typedef UnlockGuard <RecursiveMutex> ScopedUnlockType;
|
||||
typedef TryLockGuard <RecursiveMutex> ScopedTryLockType;
|
||||
using ScopedLockType = std::lock_guard <RecursiveMutex>;
|
||||
using ScopedUnlockType = UnlockGuard <RecursiveMutex>;
|
||||
using ScopedTryLockType = TryLockGuard <RecursiveMutex>;
|
||||
|
||||
/** Create the mutex.
|
||||
The mutux is initially unowned.
|
||||
|
||||
@@ -56,8 +56,8 @@ template <typename Context, typename ScopedType>
|
||||
class ScopedWrapperContext
|
||||
{
|
||||
public:
|
||||
typedef Context context_type;
|
||||
typedef ScopedType scoped_type;
|
||||
using context_type = Context;
|
||||
using scoped_type = ScopedType;
|
||||
|
||||
class Scope
|
||||
{
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace beast {
|
||||
String value2;
|
||||
};
|
||||
|
||||
typedef SharedData <State> SharedState;
|
||||
using SharedState = SharedData <State>;
|
||||
|
||||
SharedState m_state;
|
||||
|
||||
@@ -113,11 +113,11 @@ template <typename Value, class SharedMutexType =
|
||||
class SharedData
|
||||
{
|
||||
private:
|
||||
typedef typename SharedMutexType::LockGuardType LockGuardType;
|
||||
typedef typename SharedMutexType::SharedLockGuardType SharedLockGuardType;
|
||||
using LockGuardType = typename SharedMutexType::LockGuardType;
|
||||
using SharedLockGuardType = typename SharedMutexType::SharedLockGuardType;
|
||||
|
||||
public:
|
||||
typedef Value ValueType;
|
||||
using ValueType = Value;
|
||||
|
||||
class Access;
|
||||
class ConstAccess;
|
||||
|
||||
@@ -28,7 +28,7 @@ template <typename Mutex>
|
||||
class SharedLockGuard
|
||||
{
|
||||
public:
|
||||
typedef Mutex MutexType;
|
||||
using MutexType = Mutex;
|
||||
|
||||
explicit SharedLockGuard (Mutex const& mutex)
|
||||
: m_mutex (mutex)
|
||||
|
||||
@@ -35,9 +35,9 @@ template <class Mutex>
|
||||
class SharedMutexAdapter
|
||||
{
|
||||
public:
|
||||
typedef Mutex MutexType;
|
||||
typedef std::lock_guard <SharedMutexAdapter> LockGuardType;
|
||||
typedef SharedLockGuard <SharedMutexAdapter> SharedLockGuardType;
|
||||
using MutexType = Mutex;
|
||||
using LockGuardType = std::lock_guard <SharedMutexAdapter>;
|
||||
using SharedLockGuardType = SharedLockGuard <SharedMutexAdapter>;
|
||||
|
||||
void lock() const
|
||||
{
|
||||
|
||||
@@ -50,10 +50,10 @@ class SpinLock
|
||||
{
|
||||
public:
|
||||
/** 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. */
|
||||
typedef UnlockGuard <SpinLock> ScopedUnlockType;
|
||||
using ScopedUnlockType = UnlockGuard <SpinLock>;
|
||||
|
||||
SpinLock()
|
||||
: m_lock (0)
|
||||
|
||||
@@ -253,7 +253,7 @@ private:
|
||||
friend class RootStoppable;
|
||||
|
||||
struct Child;
|
||||
typedef LockFreeStack <Child> Children;
|
||||
using Children = LockFreeStack <Child>;
|
||||
|
||||
struct Child : Children::Node
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@ template <typename Mutex>
|
||||
class TryLockGuard
|
||||
{
|
||||
public:
|
||||
typedef Mutex MutexType;
|
||||
using MutexType = Mutex;
|
||||
|
||||
explicit TryLockGuard (Mutex const& mutex)
|
||||
: m_mutex (mutex)
|
||||
|
||||
@@ -26,7 +26,7 @@ template <typename Mutex>
|
||||
class UnlockGuard
|
||||
{
|
||||
public:
|
||||
typedef Mutex MutexType;
|
||||
using MutexType = Mutex;
|
||||
|
||||
explicit UnlockGuard (Mutex const& mutex)
|
||||
: m_mutex (mutex)
|
||||
|
||||
@@ -34,7 +34,7 @@ private:
|
||||
Handler m_handler;
|
||||
|
||||
public:
|
||||
typedef void result_type;
|
||||
using result_type = void;
|
||||
|
||||
DispatchedHandler (Dispatcher dispatcher, Handler& handler)
|
||||
: m_dispatcher (dispatcher)
|
||||
|
||||
@@ -29,14 +29,14 @@ template <class Mutex, class CondVar>
|
||||
class basic_semaphore
|
||||
{
|
||||
private:
|
||||
typedef std::unique_lock <Mutex> scoped_lock;
|
||||
using scoped_lock = std::unique_lock <Mutex>;
|
||||
|
||||
Mutex m_mutex;
|
||||
CondVar m_cond;
|
||||
std::size_t m_count;
|
||||
|
||||
public:
|
||||
typedef std::size_t size_type;
|
||||
using size_type = std::size_t;
|
||||
|
||||
/** Create the semaphore, with an optional initial count.
|
||||
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
|
||||
|
||||
@@ -141,7 +141,7 @@ public:
|
||||
Multiline output sent to the stream will be atomically
|
||||
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. */
|
||||
log_t log;
|
||||
|
||||
@@ -286,7 +286,7 @@ private:
|
||||
List <Item> children;
|
||||
};
|
||||
|
||||
typedef SharedData <State> SharedState;
|
||||
using SharedState = SharedData <State>;
|
||||
|
||||
std::string const m_name;
|
||||
SharedState m_state;
|
||||
|
||||
@@ -35,8 +35,8 @@ struct hash <std::pair <First, Second>>
|
||||
, private boost::base_from_member <std::hash <Second>, 1>
|
||||
{
|
||||
private:
|
||||
typedef boost::base_from_member <std::hash <First>, 0> first_hash;
|
||||
typedef boost::base_from_member <std::hash <Second>, 1> second_hash;
|
||||
using first_hash = boost::base_from_member <std::hash <First>, 0>;
|
||||
using second_hash = boost::base_from_member <std::hash <Second>, 1>;
|
||||
|
||||
public:
|
||||
hash ()
|
||||
|
||||
@@ -604,7 +604,7 @@ void PropertyStream::add (long double value)
|
||||
class PropertyStream_test : public unit_test::suite
|
||||
{
|
||||
public:
|
||||
typedef PropertyStream::Source Source;
|
||||
using Source = PropertyStream::Source;
|
||||
|
||||
void test_peel_name (std::string s, std::string const& expected,
|
||||
std::string const& expected_remainder)
|
||||
|
||||
@@ -32,13 +32,13 @@ namespace is_call_possible_detail
|
||||
template<typename Z>
|
||||
struct add_reference
|
||||
{
|
||||
typedef Z& type;
|
||||
using type = Z&;
|
||||
};
|
||||
|
||||
template<typename Z>
|
||||
struct add_reference<Z&>
|
||||
{
|
||||
typedef Z& type;
|
||||
using type = Z&;
|
||||
};
|
||||
|
||||
template <typename Z> class void_exp_result {};
|
||||
@@ -52,13 +52,13 @@ namespace is_call_possible_detail
|
||||
template <typename src_type, typename dest_type>
|
||||
struct clone_constness
|
||||
{
|
||||
typedef dest_type type;
|
||||
using type = dest_type;
|
||||
};
|
||||
|
||||
template <typename src_type, typename 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 \
|
||||
{ \
|
||||
private: \
|
||||
typedef std::remove_reference_t <DT> Z; \
|
||||
using Z = std::remove_reference_t <DT>; \
|
||||
class yes {}; \
|
||||
class no { yes m[2]; }; \
|
||||
struct derived : public Z \
|
||||
@@ -175,7 +175,7 @@ private:
|
||||
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> \
|
||||
struct return_value_check \
|
||||
|
||||
@@ -28,9 +28,9 @@ namespace beast {
|
||||
template <bool IsConst, class T>
|
||||
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>::type type;
|
||||
typename std::remove_const <T>::type>::type;
|
||||
};
|
||||
|
||||
/** Alias for omitting `typename`. */
|
||||
|
||||
@@ -53,8 +53,8 @@ private:
|
||||
Int m_value;
|
||||
|
||||
public:
|
||||
typedef Int value_type;
|
||||
typedef Tag tag_type;
|
||||
using value_type = Int;
|
||||
using tag_type = Tag;
|
||||
|
||||
tagged_integer() = default;
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
class test1
|
||||
: private empty_base_optimization<T>
|
||||
{
|
||||
typedef empty_base_optimization<T> Base;
|
||||
using Base = empty_base_optimization<T>;
|
||||
void* m_p;
|
||||
public:
|
||||
explicit test1 (T const& t)
|
||||
|
||||
@@ -38,7 +38,7 @@ public:
|
||||
struct Case
|
||||
{
|
||||
enum { count = N };
|
||||
typedef Tag type;
|
||||
using type = Tag;
|
||||
};
|
||||
|
||||
struct Counts
|
||||
|
||||
@@ -35,9 +35,9 @@ private:
|
||||
struct Tag1 { };
|
||||
struct Tag2 { };
|
||||
|
||||
typedef tagged_integer <std::uint32_t, Tag1> TagInt1;
|
||||
typedef tagged_integer <std::uint32_t, Tag2> TagInt2;
|
||||
typedef tagged_integer <std::uint64_t, Tag1> TagInt3;
|
||||
using TagInt1 = tagged_integer <std::uint32_t, Tag1>;
|
||||
using TagInt2 = tagged_integer <std::uint32_t, Tag2>;
|
||||
using TagInt3 = tagged_integer <std::uint64_t, Tag1>;
|
||||
|
||||
// Check construction of tagged_integers
|
||||
static_assert (std::is_constructible<TagInt1, std::uint32_t>::value,
|
||||
|
||||
@@ -42,7 +42,7 @@ template <typename T>
|
||||
std::string
|
||||
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 (
|
||||
#ifndef _MSC_VER
|
||||
abi::__cxa_demangle (typeid(TR).name(), nullptr,
|
||||
|
||||
@@ -90,7 +90,7 @@ class weak_binder
|
||||
: private beast::empty_base_optimization<Policy>
|
||||
{
|
||||
private:
|
||||
typedef R (T::*member_type)(Args...);
|
||||
using member_type = R (T::*)(Args...);
|
||||
using pointer_type = std::weak_ptr<T>;
|
||||
using shared_type = std::shared_ptr<T>;
|
||||
member_type member_;
|
||||
|
||||
@@ -43,11 +43,11 @@ namespace ripple {
|
||||
class AcceptedLedger
|
||||
{
|
||||
public:
|
||||
typedef std::shared_ptr<AcceptedLedger> pointer;
|
||||
typedef const pointer& ret;
|
||||
typedef std::map<int, AcceptedLedgerTx::pointer> map_t; // Must be an ordered map!
|
||||
typedef map_t::value_type value_type;
|
||||
typedef map_t::const_iterator const_iterator;
|
||||
using pointer = std::shared_ptr<AcceptedLedger>;
|
||||
using ret = const pointer&;
|
||||
using map_t = std::map<int, AcceptedLedgerTx::pointer>; // Must be an ordered map!
|
||||
using value_type = map_t::value_type;
|
||||
using const_iterator = map_t::const_iterator;
|
||||
|
||||
public:
|
||||
static pointer makeAcceptedLedger (Ledger::ref ledger);
|
||||
|
||||
@@ -46,8 +46,8 @@ namespace ripple {
|
||||
class AcceptedLedgerTx
|
||||
{
|
||||
public:
|
||||
typedef std::shared_ptr <AcceptedLedgerTx> pointer;
|
||||
typedef const pointer& ref;
|
||||
using pointer = std::shared_ptr <AcceptedLedgerTx>;
|
||||
using ref = const pointer&;
|
||||
|
||||
public:
|
||||
AcceptedLedgerTx (Ledger::ref ledger, SerialIter& sit);
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace ripple {
|
||||
class BookListeners
|
||||
{
|
||||
public:
|
||||
typedef std::shared_ptr<BookListeners> pointer;
|
||||
using pointer = std::shared_ptr<BookListeners>;
|
||||
|
||||
BookListeners () {}
|
||||
|
||||
@@ -38,8 +38,8 @@ public:
|
||||
void publish (Json::Value const& jvObj);
|
||||
|
||||
private:
|
||||
typedef RippleRecursiveMutex LockType;
|
||||
typedef std::lock_guard <LockType> ScopedLockType;
|
||||
using LockType = RippleRecursiveMutex;
|
||||
using ScopedLockType = std::lock_guard <LockType>;
|
||||
LockType mLock;
|
||||
|
||||
hash_map<std::uint64_t, InfoSub::wptr> mListeners;
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace ripple {
|
||||
class ConsensusTransSetSF : public SHAMapSyncFilter
|
||||
{
|
||||
public:
|
||||
typedef TaggedCache <uint256, Blob> NodeCache;
|
||||
using NodeCache = TaggedCache <uint256, Blob>;
|
||||
|
||||
// VFALCO TODO Use a dependency injection to get the temp node cache
|
||||
ConsensusTransSetSF (NodeCache& nodeCache);
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace ripple {
|
||||
class DisputedTx
|
||||
{
|
||||
public:
|
||||
typedef std::shared_ptr <DisputedTx> pointer;
|
||||
using pointer = std::shared_ptr <DisputedTx>;
|
||||
|
||||
DisputedTx (uint256 const& txID,
|
||||
Blob const& tx,
|
||||
|
||||
@@ -37,8 +37,8 @@ class InboundLedger
|
||||
public:
|
||||
static char const* getCountedObjectName () { return "InboundLedger"; }
|
||||
|
||||
typedef std::shared_ptr <InboundLedger> pointer;
|
||||
typedef std::pair < std::weak_ptr<Peer>, std::shared_ptr<protocol::TMLedgerData> > PeerDataPairType;
|
||||
using pointer = std::shared_ptr <InboundLedger>;
|
||||
using PeerDataPairType = std::pair < std::weak_ptr<Peer>, std::shared_ptr<protocol::TMLedgerData> >;
|
||||
|
||||
// These are the reasons we might acquire a ledger
|
||||
enum fcReason
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
|
||||
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 ();
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ private:
|
||||
DecayWindow<30, clock_type> fetchRate_;
|
||||
|
||||
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
|
||||
static const int kReacquireIntervalSeconds = 300;
|
||||
|
||||
@@ -381,10 +381,10 @@ public:
|
||||
private:
|
||||
clock_type& m_clock;
|
||||
|
||||
typedef hash_map <uint256, InboundLedger::pointer> MapType;
|
||||
using MapType = hash_map <uint256, InboundLedger::pointer>;
|
||||
|
||||
typedef RippleRecursiveMutex LockType;
|
||||
typedef std::unique_lock <LockType> ScopedLockType;
|
||||
using LockType = RippleRecursiveMutex;
|
||||
using ScopedLockType = std::unique_lock <LockType>;
|
||||
LockType mLock;
|
||||
|
||||
MapType mLedgers;
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace ripple {
|
||||
class InboundLedgers
|
||||
{
|
||||
public:
|
||||
typedef beast::abstract_clock <std::chrono::steady_clock> clock_type;
|
||||
using clock_type = beast::abstract_clock <std::chrono::steady_clock>;
|
||||
|
||||
virtual ~InboundLedgers() = 0;
|
||||
|
||||
|
||||
@@ -79,8 +79,8 @@ class Ledger
|
||||
public:
|
||||
static char const* getCountedObjectName () { return "Ledger"; }
|
||||
|
||||
typedef std::shared_ptr<Ledger> pointer;
|
||||
typedef const std::shared_ptr<Ledger>& ref;
|
||||
using pointer = std::shared_ptr<Ledger>;
|
||||
using ref = const std::shared_ptr<Ledger>&;
|
||||
|
||||
enum TransResult
|
||||
{
|
||||
@@ -333,7 +333,7 @@ public:
|
||||
|
||||
// Ledger hash table function
|
||||
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;
|
||||
|
||||
std::vector<uint256> getLedgerAmendments () const;
|
||||
|
||||
@@ -70,7 +70,7 @@ public:
|
||||
int failures; // Number of errors encountered since last success
|
||||
};
|
||||
|
||||
typedef beast::SharedData <State> SharedState;
|
||||
using SharedState = beast::SharedData <State>;
|
||||
|
||||
SharedState m_state;
|
||||
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