|
| capped_allocator (detail::value_or_reference< Counter > count, const Alloc &alloc={}, bool subtract_on_deallocate=true) |
| Constructs capped allocator adapter. More...
|
|
template<typename C = Counter, typename boost::enable_if< std::uses_allocator< C, Alloc > >::type * = nullptr> |
| capped_allocator (typename C::value_type max_value, const Alloc &alloc={}, bool subtract_on_deallocate=true) |
| Constructs capped allocator adapter. More...
|
|
template<typename OtherAlloc , typename boost::enable_if< std::is_convertible< OtherAlloc, Alloc > >::type * = nullptr> |
| capped_allocator (const capped_allocator< OtherAlloc, Counter > &other) |
| Converts from a compatible allocator. More...
|
|
template<typename Alloc, typename Counter>
class bond::ext::capped_allocator< Alloc, Counter >
STL-compatible allocator adapter that fails allocations by throwing std::bad_alloc
if the maximum number of bytes to be allocated is exceeded
- Template Parameters
-
Alloc | underlying allocator type. |
Counter | underlying counter type. |