std::allocator::rebind is deprecated

Clang should no longer scream
This commit is contained in:
Kae 2024-02-20 19:34:58 +11:00
parent 43b2fa53e7
commit e6f96cb2bd
4 changed files with 5 additions and 5 deletions

View File

@ -31,7 +31,7 @@ private:
key_type const& operator()(TableValue const& value) const; key_type const& operator()(TableValue const& value) const;
}; };
typedef FlatHashTable<TableValue, key_type, GetKey, Hash, Equals, typename Allocator::template rebind<TableValue>::other> Table; typedef FlatHashTable<TableValue, key_type, GetKey, Hash, Equals, typename std::allocator_traits<Allocator>::template rebind_alloc<TableValue>> Table;
public: public:
struct const_iterator { struct const_iterator {

View File

@ -39,7 +39,7 @@ private:
size_t hash; size_t hash;
}; };
typedef std::vector<Bucket, typename Allocator::template rebind<Bucket>::other> Buckets; typedef std::vector<Bucket, typename std::allocator_traits<Allocator>::template rebind_alloc<Bucket>> Buckets;
public: public:
struct const_iterator { struct const_iterator {

View File

@ -17,7 +17,7 @@ public:
typedef LinkedList<value_type, Allocator> OrderType; typedef LinkedList<value_type, Allocator> OrderType;
typedef Map< typedef Map<
std::reference_wrapper<key_type const>, typename OrderType::iterator, MapArgs..., std::reference_wrapper<key_type const>, typename OrderType::iterator, MapArgs...,
typename Allocator::template rebind<pair<std::reference_wrapper<key_type const> const, typename OrderType::iterator>>::other typename std::allocator_traits<Allocator>::template rebind_alloc<pair<std::reference_wrapper<key_type const> const, typename OrderType::iterator>>
> MapType; > MapType;
typedef typename OrderType::iterator iterator; typedef typename OrderType::iterator iterator;

View File

@ -14,10 +14,10 @@ class OrderedSetWrapper {
public: public:
typedef Value value_type; typedef Value value_type;
typedef LinkedList<value_type, typename Allocator::template rebind<value_type>::other> OrderType; typedef LinkedList<value_type, typename std::allocator_traits<Allocator>::template rebind_alloc<value_type>> OrderType;
typedef Map< typedef Map<
std::reference_wrapper<value_type const>, typename OrderType::const_iterator, Args..., std::reference_wrapper<value_type const>, typename OrderType::const_iterator, Args...,
typename Allocator::template rebind<pair<std::reference_wrapper<value_type const> const, typename OrderType::const_iterator>>::other typename std::allocator_traits<Allocator>::template rebind_alloc<pair<std::reference_wrapper<value_type const> const, typename OrderType::const_iterator>>
> MapType; > MapType;
typedef typename OrderType::const_iterator const_iterator; typedef typename OrderType::const_iterator const_iterator;