25 #ifndef COUNTING_ALLOCATOR_HPP
26 #define COUNTING_ALLOCATOR_HPP
77 constexpr
void flush_stats() noexcept {
101 #if __cplusplus > 201703L
103 : std::allocator<value_type>(other),
112 : std::allocator<value_type>(other),
121 #if __cplusplus > 201703L
122 template <
typename U>
124 : std::allocator<value_type>(other),
132 template <
typename U>
134 : std::allocator<value_type>(other),
143 #if __cplusplus > 201703L
149 #if __cplusplus <= 201703L
155 return std::allocator<value_type>::allocate(n, hint);
159 #if __cplusplus > 201703L
165 return std::allocator<value_type>::allocate(n);
173 return std::allocator<value_type>::allocate(n);
177 #if __cplusplus > 201703L
183 std::allocator<value_type>::deallocate(p, n);
191 std::allocator<value_type>::deallocate(p, n);
196 #if __cplusplus > 201703L
197 template <
class T1,
class T2>
198 constexpr
bool operator==(
const counting_allocator<T1>& lhs,
const counting_allocator<T2>& rhs) noexcept {
203 return lhs.memory_usage == rhs.memory_usage;
211 template <
class T1,
class T2>
217 return lhs.memory_usage == rhs.memory_usage;
224 template <
class T1,
class T2>
232 #endif // COUNTING_ALLOCATOR_HPP