Boost C++ Libraries: Ticket #10281: including intrusive/list.hpp breaks compilation using managed_shared_memory https://svn.boost.org/trac10/ticket/10281 <p> The following small program fails to compile: </p> <pre class="wiki"> #include &lt;boost/intrusive/list.hpp&gt; // comment out this to make error go away #include &lt;boost/interprocess/managed_shared_memory.hpp&gt; using namespace boost::interprocess; managed_shared_memory msm; void test() { msm = boost::interprocess::managed_shared_memory(open_or_create, "test", 100); } </pre><p> /code/git/boost/boost/intrusive/pointer_traits.hpp:173:74: error: static_cast from type ‘boost::intrusive::pointer_traits&lt;boost::interprocess::offset_ptr&lt;const void, long int, long unsigned int, 0ul&gt; &gt;::element_type* {aka const void*}’ to type ‘boost::intrusive::pointer_traits&lt;boost::interprocess::offset_ptr&lt;boost::intrusive::bhtraits&lt;boost::interprocess::rbtree_best_fit&lt;boost::interprocess::mutex_family&gt;::block_ctrl, boost::intrusive::rbtree_node_traits&lt;boost::interprocess::offset_ptr&lt;void&gt;, true&gt;, (boost::intrusive::link_mode_type)0u, boost::intrusive::default_tag, 3u&gt;, long int, long unsigned int, 0ul&gt; &gt;::element_type* {aka boost::intrusive::bhtraits&lt;boost::interprocess::rbtree_best_fit&lt;boost::interprocess::mutex_family&gt;::block_ctrl, boost::intrusive::rbtree_node_traits&lt;boost::interprocess::offset_ptr&lt;void&gt;, true&gt;, (boost::intrusive::link_mode_type)0u, boost::intrusive::default_tag, 3u&gt;*}’ casts away qualifiers </p> <p> cc --version gcc (<a class="missing wiki">Ubuntu/Linaro</a> 4.7.2-2ubuntu1) 4.7.2 </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10281 Trac 1.4.3 Ion Gaztañaga Thu, 31 Jul 2014 21:32:38 GMT <link>https://svn.boost.org/trac10/ticket/10281#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10281#comment:1</guid> <description> <p> Compiled in Mingw with GCC-4.7.3 and GCC-4.8 with current code, there is no error. Can you try the Boost 1.56 Beta to see if the problem is already solved? </p> </description> <category>Ticket</category> </item> </channel> </rss>