On Wednesday, October 11, 2017 at 12:23:53 PM UTC-4, bitrex wrote:
>
> Ok, but if my policy's specialization default constructor is deleted (or
> private) how do I go about actually creating the instance to provide to
> the container thru the abstract interface?
Typically you pass a memory manager to the stateful allocator constructor, see e.g. the boost shared memory allocator examples,
//Initialize the shared memory STL-compatible allocator
ShmemAllocator alloc_inst (segment.get_segment_manager());
https://valelab4.ucsf.edu/svn/3rdpartypublic/boost/doc/html/interprocess/quick_guide.html
It's really important that there is no default constructor, because it's
very easy to make a mistake with instantiating member objects, and you
definitely don't want e.g. ShmemAllocator() to compile.
Daniel