25#ifndef COUNTING_ALLOCATOR_HPP
26#define COUNTING_ALLOCATOR_HPP
76 constexpr void flush_stats() noexcept {
99#if __cplusplus > 201703L
101 : std::allocator<value_type>(other),
110 : std::allocator<value_type>(other),
119#if __cplusplus > 201703L
120 template <
typename U>
122 : std::allocator<value_type>(other),
130 template <
typename U>
132 : std::allocator<value_type>(other),
141#if __cplusplus > 201703L
147#if __cplusplus <= 201703L
153 return std::allocator<value_type>::allocate(n, hint);
157#if __cplusplus > 201703L
163 return std::allocator<value_type>::allocate(n);
171 return std::allocator<value_type>::allocate(n);
175#if __cplusplus > 201703L
181 std::allocator<value_type>::deallocate(p, n);
189 std::allocator<value_type>::deallocate(p, n);
194#if __cplusplus > 201703L
195template <
class T1,
class T2>
196 constexpr bool operator==(
const counting_allocator<T1>& lhs,
const counting_allocator<T2>& rhs)
noexcept {
201 return lhs.memory_usage == rhs.memory_usage;
209 template <
class T1,
class T2>
215 return lhs.memory_usage == rhs.memory_usage;
222 template <
class T1,
class T2>
#define jau_format_string(fmt,...)
Macro, safely returns a (non-truncated) string according to snprintf() formatting rules using a reser...
__pack(...): Produces MSVC, clang and gcc compatible lead-in and -out macros.
bool operator==(const callocator< T1 > &lhs, const callocator< T2 > &rhs) noexcept
bool operator!=(const callocator< T1 > &lhs, const callocator< T2 > &rhs) noexcept
counting_allocator< U > other
Performance counter std::allocator specialization.
value_type * allocate(std::size_t n)
void deallocate(value_type *p, std::size_t n)
std::size_t dealloc_count
counting_allocator() noexcept
counting_allocator(const counting_allocator &other) noexcept
~counting_allocator()=default
value_type * allocate(std::size_t n, const void *hint)
counting_allocator(const counting_allocator< U > &other) noexcept