mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-28 08:06:23 +00:00
chore(Deps/Acelite): Update to 6.5.10 (#3450)
This commit is contained in:
59
deps/acelite/ace/Array_Map.h
vendored
59
deps/acelite/ace/Array_Map.h
vendored
@@ -29,9 +29,18 @@
|
||||
#include <utility>
|
||||
#include <iterator>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
#if defined __SUNPRO_CC && !defined _RWSTD_ALLOCATOR
|
||||
# define ACE_ARRAY_MAP_DEFAULT_ALLOCATOR(K, V) std::allocator_interface< \
|
||||
std::allocator<void>, \
|
||||
std::pair<K, V> >
|
||||
#else
|
||||
# define ACE_ARRAY_MAP_DEFAULT_ALLOCATOR(K, V) std::allocator<std::pair<K, V> >
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @class ACE_Array_Map
|
||||
*
|
||||
@@ -82,24 +91,25 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
* -# Copy constructor
|
||||
* -# operator=
|
||||
*/
|
||||
template<typename Key, typename Value, class EqualTo = std::equal_to<Key> >
|
||||
template<typename Key, typename Value, class EqualTo = std::equal_to<Key>,
|
||||
class Alloc = ACE_ARRAY_MAP_DEFAULT_ALLOCATOR (Key, Value) >
|
||||
class ACE_Array_Map
|
||||
{
|
||||
public:
|
||||
|
||||
// STL-style typedefs/traits.
|
||||
typedef Key key_type;
|
||||
typedef Value data_type;
|
||||
typedef std::pair<key_type, data_type> value_type;
|
||||
typedef value_type * iterator;
|
||||
typedef value_type const * const_iterator;
|
||||
typedef value_type & reference;
|
||||
typedef value_type const & const_reference;
|
||||
typedef value_type * pointer;
|
||||
typedef value_type const * const_pointer;
|
||||
typedef ptrdiff_t difference_type;
|
||||
typedef size_t size_type;
|
||||
|
||||
typedef Key key_type;
|
||||
typedef Value mapped_type;
|
||||
typedef Value data_type;
|
||||
typedef std::pair<key_type, mapped_type> value_type;
|
||||
typedef Alloc allocator_type;
|
||||
typedef value_type & reference;
|
||||
typedef value_type const & const_reference;
|
||||
typedef value_type * pointer;
|
||||
typedef value_type const * const_pointer;
|
||||
typedef value_type * iterator;
|
||||
typedef value_type const * const_iterator;
|
||||
typedef ptrdiff_t difference_type;
|
||||
typedef size_t size_type;
|
||||
ACE_DECLARE_STL_REVERSE_ITERATORS
|
||||
|
||||
/// Default Constructor.
|
||||
@@ -233,14 +243,16 @@ public:
|
||||
* @par
|
||||
* map["Foo"] = 12;
|
||||
*/
|
||||
data_type & operator[] (key_type const & k);
|
||||
mapped_type & operator[] (key_type const & k);
|
||||
|
||||
allocator_type get_allocator() const { return alloc_; }
|
||||
|
||||
private:
|
||||
|
||||
/// Increase size of underlying buffer by @a s.
|
||||
void grow (size_type s);
|
||||
|
||||
private:
|
||||
/// The allocator.
|
||||
allocator_type alloc_;
|
||||
|
||||
/// Number of elements in the map.
|
||||
size_type size_;
|
||||
@@ -253,20 +265,19 @@ private:
|
||||
|
||||
/// Underlying array containing keys and data.
|
||||
value_type * nodes_;
|
||||
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------
|
||||
|
||||
/// @c ACE_Array_Map equality operator.
|
||||
template <typename Key, typename Value, class EqualTo>
|
||||
bool operator== (ACE_Array_Map<Key, Value, EqualTo> const & lhs,
|
||||
ACE_Array_Map<Key, Value, EqualTo> const & rhs);
|
||||
template <typename Key, typename Value, class EqualTo, class Alloc>
|
||||
bool operator== (ACE_Array_Map<Key, Value, EqualTo, Alloc> const & lhs,
|
||||
ACE_Array_Map<Key, Value, EqualTo, Alloc> const & rhs);
|
||||
|
||||
/// @c ACE_Array_Map lexicographical comparison operator.
|
||||
template <typename Key, typename Value, class EqualTo>
|
||||
bool operator< (ACE_Array_Map<Key, Value, EqualTo> const & lhs,
|
||||
ACE_Array_Map<Key, Value, EqualTo> const & rhs);
|
||||
template <typename Key, typename Value, class EqualTo, class Alloc>
|
||||
bool operator< (ACE_Array_Map<Key, Value, EqualTo, Alloc> const & lhs,
|
||||
ACE_Array_Map<Key, Value, EqualTo, Alloc> const & rhs);
|
||||
|
||||
// --------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user