I am trying to create a circular buffer in shared memory using Boost circular_buffer and Interprocess libraries. I compiled and ran the example in the Process Documentation to create a vector in shared memory without any problems. However, when I change it to use Boost round_buffer like:
int main(int argc, char *argv[]) { managed_shared_memory segment(create_only, "MySharedMemory", 65536); const ShmemAllocator alloc_inst (segment.get_segment_manager()); MyCircBuffer *myCircBuf = segment.construct<MyCircBuffer>("MyCircBuffer")(alloc_inst); return 0; }
I get a compilation error (called segment.construct() ). Any idea what I'm doing wrong? Is this because circular_buffer not one of the containers listed in /boost/interprocess/containers , i.e. is it incompatible with Interprocess?
Thanks,
C
source share