<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>&quot;MySharedMemory&quot;,65536 //segment name</div><div><span style="white-space:pre-wrap">			</span>);</div><div><span style="white-space:pre-wrap">	</span> static bip::allocator&lt;void, bip::managed_shared_memory::segment_manager&gt; global_alloc(global_mm.get_segment_manager());</div><div><br></div><div><span style="white-space:pre-wrap">	</span>boost::icl::interval_map&lt;int, int&gt; *party = global_mm.find_or_construct&lt;boost::icl::interval_map&lt;int, int&gt;&gt;(&quot;Store&quot;)(global_alloc);</div><div><span style="white-space:pre-wrap">	</span>party-&gt;add(make_pair(boost::icl::interval&lt;int&gt;::right_open(4,5),1));</div><div><br></div><div><span style="white-space:pre-wrap">	</span>std::cout &lt;&lt; &quot;adding result: &quot; &lt;&lt; *party &lt;&lt; &quot;\n&quot;;</div><div>}</div></div></div>