#include <stlsoft/memory/allocator_selector.hpp>
It is used in several components in the STLSoft libraries, performing the function of selecting a specialisation of std::allocator
for compilers/libraries where that is defined and compatible, otherwise selecting a specialisation of one of the allocator classes provided by STLSoft.
Although not likely to be necessary, it is available for use in user's class templates, as in:
template< typename T , typename A = typename stlsoft::allocator_selector<T>::allocator_type > class my_buffer { public: // Member types typedef T value_type; typedef A allocator_type; . . . };
Public Types | |
typedef _some_allocator_< T > | allocator_type |
The actual allocator specialisation. |
typedef _some_allocator_<T> allocator_type |
The actual allocator specialisation.
This will be one of: stlsoft::malloc_allocator<T>, stlsoft::new_allocator<T> or stlsoft::std::allocator<T>.