mirror of
https://github.com/boostorg/container.git
synced 2026-01-19 04:02:17 +00:00
Add dummy allocator utility to be able to use allocator_traits machinery without instantiating a real allocator
This commit is contained in:
@@ -86,6 +86,15 @@ namespace boost {
|
||||
namespace container {
|
||||
namespace dtl {
|
||||
|
||||
template <class T>
|
||||
class allocator_traits_dummy
|
||||
{
|
||||
public:
|
||||
typedef T value_type;
|
||||
T *allocate(std::size_t){ return 0; }
|
||||
void deallocate(T *, std::size_t){}
|
||||
};
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
template<class T, class ...Args>
|
||||
|
||||
Reference in New Issue
Block a user