<div dir="ltr"><span style="font-size:12.8px">I have been trying to store boost interval map in shared memory, but my code below does not compile when I pass allocator while constructing map. After seeing template definition of boost interval_map I assume that boost icl only supports std::allocator. Is there any way to store this container in shared memory.</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">int main () {</div><div style="font-size:12.8px"><div> static bip::managed_shared_memory global_mm(boost::interprocess::open_or_create,</div><div><span style="white-space:pre-wrap"> </span>"MySharedMemory",65536 //segment name</div><div><span style="white-space:pre-wrap"> </span>);</div><div><span style="white-space:pre-wrap"> </span> static bip::allocator<void, bip::managed_shared_memory::segment_manager> global_alloc(global_mm.get_segment_manager());</div><div><br></div><div><span style="white-space:pre-wrap"> </span>boost::icl::interval_map<int, int> *party = global_mm.find_or_construct<boost::icl::interval_map<int, int>>("Store")(global_alloc);</div><div><span style="white-space:pre-wrap"> </span>party->add(make_pair(boost::icl::interval<int>::right_open(4,5),1));</div><div><br></div><div><span style="white-space:pre-wrap"> </span>std::cout << "adding result: " << *party << "\n";</div><div>}</div></div></div>