diff --git a/alloc/allocator.hpp b/alloc/allocator.hpp index c1cc37d3..c842e25b 100644 --- a/alloc/allocator.hpp +++ b/alloc/allocator.hpp @@ -23,7 +23,7 @@ // C++11 allocator concept conformant allocator adaptor, going from our // allocator interface to that of the STL and friends. namespace util::alloc { - template + template class allocator { public: typedef ValueT value_type; @@ -54,6 +54,16 @@ namespace util::alloc { private: BackingT &m_backing; }; + + + /////////////////////////////////////////////////////////////////////////// + // convenience type-inferring constructor for allocators. + template + auto + make_allocator (BackingT &backing) + { + return allocator (backing); + } } #endif