title: Problem creating a circular buffer in shared memory using Boost
body: <p>I am trying to create a circular buffer in shared memory using Boost <code>circular_buffer</code> and Interprocess libraries. I compiled and ran the the example given in the <a href="http://www.boost.org/doc/libs/1_42_0/doc/html/interprocess/quick_guide.html#interprocess.quick_guide.qg_interprocess_container" rel="nofollow noreferrer">Interprocess documentation</a> for creating a vector in shared memory with no problem. However, when I modify it to use the Boost circular_buffer as:</p>
  <pre><code>int main(int argc, char *argv[])
  {
      managed_shared_memory segment(create_only, &quot;MySharedMemory&quot;, 65536);
      const ShmemAllocator alloc_inst (segment.get_segment_manager());
      MyCircBuffer  *myCircBuf  = segment.construct&lt;MyCircBuffer&gt;(&quot;MyCircBuffer&quot;)(alloc_inst);
      return 0;
  } 
  </code></pre>
  <p>I get a compilation error (caused by <code>segment.construct()</code>). Any idea what I am doing wrong? Is it because <code>circular_buffer</code> is not one of the containers listed in <code>/boost/interprocess/containers</code>, i.e. it's not compatible with Interprocess?</p>
  <p>Thanks,</p>
  <p>C</p>