Build error with Boost Interprocess SharedMemory

In Boost::Interprocess "Creating maps in shared memory" section

there's a sample. In the sample, std::allocator is used with 2 params:

typedef allocator<ValueType, managed_shared_memory::segment_manager> 
         ShmemAllocator;

But standard allocator template is like that:

template < class T > class allocator;

So, how can it be?

Thanks.


A person in a forum helped me. Here's the answer: The allocator used in the sample is not std::allocator, it is boost::interprocess::allocator.

链接地址: http://www.djcxy.com/p/50966.html

上一篇: C ++

下一篇: 使用Boost进程间共享内存构建错误