Boost C++ Libraries: Ticket #6319: message_queue fails to compile with gcc 3.4.6 - ambiguous class template instantiation https://svn.boost.org/trac10/ticket/6319 <p> message_queue compiled with gcc 3.4.6 in boost 1.47.0. </p> <p> On CentOS release 5.7: </p> <pre class="wiki">$ cd boost_1_48_0/libs/interprocess/example </pre><p> gcc 4.4 works fine: </p> <pre class="wiki">$ g++44 -I/opt/rotateright/include -L/opt/rotateright/lib -lboost_thread comp_doc_message_queueB.cpp -o test $ </pre><p> but gcc 3.4: </p> <pre class="wiki">$ g++34 -I/opt/rotateright/include -L/opt/rotateright/lib -lboost_thread comp_doc_message_queueB.cpp -o test /opt/rotateright/include/boost/interprocess/ipc/message_queue.hpp: In instantiation of `boost::interprocess::message_queue_t&lt;boost::interprocess::offset_ptr&lt;void, ptrdiff_t, size_t, 0u&gt; &gt;': comp_doc_message_queueB.cpp:23: instantiated from here /opt/rotateright/include/boost/interprocess/ipc/message_queue.hpp:57: error: ambiguous class template instantiation for `struct boost::pointer_to_other&lt;boost::interprocess::offset_ptr&lt;void, ptrdiff_t, size_t, 0u&gt;, char&gt;' /opt/rotateright/include/boost/interprocess/offset_ptr.hpp:490: error: candidates are: struct boost::pointer_to_other&lt;boost::interprocess::offset_ptr&lt;T1, P1, O1, A1&gt;, U&gt; /opt/rotateright/include/boost/pointer_to_other.hpp:43: error: struct boost::pointer_to_other&lt;Sp&lt;T, T2, T3&gt;, U&gt; /opt/rotateright/include/boost/pointer_to_other.hpp:36: error: struct boost::pointer_to_other&lt;Sp&lt;T, T2&gt;, U&gt; /opt/rotateright/include/boost/pointer_to_other.hpp:29: error: struct boost::pointer_to_other&lt;Sp&lt;T&gt;, U&gt; /opt/rotateright/include/boost/interprocess/ipc/message_queue.hpp:57: error: invalid use of undefined type `struct boost::pointer_to_other&lt;boost::interprocess::offset_ptr&lt;void, ptrdiff_t, size_t, 0u&gt;, char&gt;' /opt/rotateright/include/boost/pointer_to_other.hpp:24: error: declaration of `struct boost::pointer_to_other&lt;boost::interprocess::offset_ptr&lt;void, ptrdiff_t, size_t, 0u&gt;, char&gt;' ... </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6319 Trac 1.4.3 Ion Gaztañaga Wed, 18 Jan 2012 20:59:19 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/6319#comment:1 https://svn.boost.org/trac10/ticket/6319#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Fixed. Trunk and release versions of Interprocess compile fine now with GCC 3.4.6 </p> Ticket anonymous Fri, 17 Feb 2012 18:14:05 GMT <link>https://svn.boost.org/trac10/ticket/6319#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6319#comment:2</guid> <description> <p> in gcc version 4.1.2 same problem.... </p> <p> g++ -O2 -g -Wall -c -I/dgtc/sv/gerback/boost/include -I/usr/local/include -I/dgtc/sv/gerback/gerback2/working/headersBd -I/usr/include -I/axs/include -Dlinux -DLINUX -DIC86 Gerback2.cpp /dgtc/sv/gerback/boost/include/boost/interprocess/ipc/message_queue.hpp: In instantiation of ‘boost::interprocess::message_queue_t&lt;boost::interprocess::offset_ptr&lt;void, int, unsigned int, 0u&gt; &gt;’: Gerback2.cpp:1088: instantiated from here /dgtc/sv/gerback/boost/include/boost/interprocess/ipc/message_queue.hpp:57: error: ambiguous class template instantiation for ‘struct boost::pointer_to_other&lt;boost::interprocess::offset_ptr&lt;void, int, unsigned int, 0u&gt;, char&gt;’ /dgtc/sv/gerback/boost/include/boost/pointer_to_other.hpp:29: error: candidates are: struct boost::pointer_to_other&lt;Sp&lt;T&gt;, U&gt; /dgtc/sv/gerback/boost/include/boost/pointer_to_other.hpp:36: error: struct boost::pointer_to_other&lt;Sp&lt;T, T2&gt;, U&gt; /dgtc/sv/gerback/boost/include/boost/pointer_to_other.hpp:43: error: struct boost::pointer_to_other&lt;Sp&lt;T, T2, T3&gt;, U&gt; /dgtc/sv/gerback/boost/include/boost/interprocess/offset_ptr.hpp:490: error: struct boost::pointer_to_other&lt;boost::interprocess::offset_ptr&lt;T1, P1, O1, A1&gt;, U&gt; /dgtc/sv/gerback/boost/include/boost/interprocess/ipc/message_queue.hpp:57: error: invalid use of undefined type ‘struct boost::pointer_to_other&lt;boost::interprocess::offset_ptr&lt;void, int, unsigned int, 0u&gt;, char&gt;’ /dgtc/sv/gerback/boost/include/boost/pointer_to_other.hpp:24: error: declaration of ‘struct boost::pointer_to_other&lt;boost::interprocess::offset_ptr&lt;void, int, unsigned int, 0u&gt;, char&gt;’ </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Fri, 17 Feb 2012 18:44:15 GMT</pubDate> <title>status changed; resolution deleted https://svn.boost.org/trac10/ticket/6319#comment:3 https://svn.boost.org/trac10/ticket/6319#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">fixed</span> </li> </ul> <p> as i said, same problem, can you please tel-me the workaround ?? </p> <p> thanks </p> Ticket joaobuenosi@… Fri, 17 Feb 2012 18:46:31 GMT <link>https://svn.boost.org/trac10/ticket/6319#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6319#comment:4</guid> <description> <p> my e-mail joaobuenosi@…, name joao luiz </p> </description> <category>Ticket</category> </item> <item> <author>slingn@…</author> <pubDate>Fri, 17 Feb 2012 18:49:28 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6319#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6319#comment:5</guid> <description> <p> Would it be possible to attach the fix to the bug? I would like to apply it locally as well. Thanks! </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Ion Gaztañaga</dc:creator> <pubDate>Fri, 17 Feb 2012 21:18:13 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6319#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6319#comment:6</guid> <description> <p> Sorry, but the patch was applied to the trunk after applying other patches, so there is no a direct patch for 1.48. You can download Boost 1.49 beta or download svn code, and since the bug is already fixed, you shouldn't reopen this bug. I'll wait until you test the code before reclosing again. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 22 Feb 2012 17:38:47 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6319#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6319#comment:7</guid> <description> <p> +1 for a local patch. </p> </description> <category>Ticket</category> </item> <item> <author>joaobuenosi@…</author> <pubDate>Wed, 22 Feb 2012 18:47:12 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6319#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6319#comment:8</guid> <description> <p> hi, compile fine with 1.49 boost and gcc version 4.1.2. </p> <p> thanks for help. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Ion Gaztañaga</dc:creator> <pubDate>Sun, 10 Feb 2013 22:18:00 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/6319#comment:9 https://svn.boost.org/trac10/ticket/6319#comment:9 <ul> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Old bug closed after confirmation. </p> Ticket