Boost C++ Libraries: Ticket #6323: Conflicting forward declarations with versioned namespace in libstdc++. https://svn.boost.org/trac10/ticket/6323 <p> GCC says following error. </p> <pre class="wiki">In file included from ./boost/functional/hash/hash.hpp:535:0, from ./boost/functional/hash.hpp:6, from ./boost/unordered/unordered_set.hpp:21, from ./boost/unordered_set.hpp:16, from ./boost/graph/adjacency_list.hpp:21, from libs/python/src/object/inheritance.cpp:11: ./boost/functional/hash/extensions.hpp:34:33: error: template declaration of 'std::size_t boost::hash_value' ./boost/functional/hash/extensions.hpp:34:28: error: reference to 'pair' is ambiguous ./boost/detail/container_fwd.hpp:143:42: error: candidates are: template&lt;class T1, class T2&gt; struct std::pair /usr/local/lib/gcc/i686-pc-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_pair.h:87:12: error: template&lt;class _T1, class _T2&gt; struct std::__7::pair ./boost/functional/hash/extensions.hpp:34:39: error: expected primary-expression before ',' token </pre><p> This problem similar to <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6287" title="#6287: Bugs: hardcoded fwd declarations don't work for gcc configured withor ... (closed: fixed)">#6287</a>. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6323 Trac 1.4.3 Daniel James Mon, 02 Jan 2012 09:38:36 GMT status, component changed; owner set https://svn.boost.org/trac10/ticket/6323#comment:1 https://svn.boost.org/trac10/ticket/6323#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Daniel James</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">hash</span> </li> </ul> <p> Do you know if there's a way to detect when versioned namespaces are used? </p> Ticket pluto@… Mon, 02 Jan 2012 15:45:53 GMT <link>https://svn.boost.org/trac10/ticket/6323#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6323#comment:2</guid> <description> <p> the &lt;boost/container/container_fwd.hpp&gt; should include &lt;boost/detail/container_fwd.hpp&gt; which handles BOOST_DETAIL_NO_CONTARINER_FWD macro that can be defined by users in such situation. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Daniel James</dc:creator> <pubDate>Mon, 02 Jan 2012 15:52:18 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6323#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6323#comment:3</guid> <description> <p> I think you're a little confused, <code>&lt;boost/container/container_fwd.hpp&gt;</code> forward declares Boost's own implementation of the containers, not the ones in the <code>std</code> namespace. It's always fine for it to forward declare its own containers. </p> </description> <category>Ticket</category> </item> <item> <author>pluto@…</author> <pubDate>Mon, 02 Jan 2012 17:49:09 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6323#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6323#comment:4</guid> <description> <p> on the 1.48.0 release the &lt;boost/container/container_fwd.hpp&gt; constains fwd decls for std:: elements and fwd decls for boost's containers and btw this is already fixed on trunk by: </p> <pre class="wiki">------------------------------------------------------------------------ r76114 | igaztanaga | 2011-12-23 13:00:27 +0100 (Fri, 23 Dec 2011) | 1 line Changed paths: M /trunk/boost/container/container_fwd.hpp M /trunk/boost/interprocess/interprocess_fwd.hpp Bug #6287 ------------------------------------------------------------------------ </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Daniel James</dc:creator> <pubDate>Mon, 02 Jan 2012 17:57:15 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6323#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6323#comment:5</guid> <description> <p> OK, I had a look at the current trunk before writing so I missed that it was changed recently. But that's for <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6287" title="#6287: Bugs: hardcoded fwd declarations don't work for gcc configured withor ... (closed: fixed)">#6287</a> and is irrelevant here anyway. This report is for an error which happens when <code>&lt;boost/detail/container_fwd.hpp&gt;</code> is included - you can see that from the error report. If there's some means by which versioned namespaces can be detected - typically by checking for a macro defined by the gcc standard library - then <code>&lt;boost/detail/container_fwd.hpp&gt;</code> can be changed to do the right thing automatically. Otherwise it'll probably have to be changed to just include all the relevant headers. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Daniel James</dc:creator> <pubDate>Fri, 13 Jan 2012 08:55:35 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6323#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6323#comment:6</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/76444" title="Unordered: Mark up new container forwarding failures. Refs #6323. A ...">[76444]</a>) Unordered: Mark up new container forwarding failures. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6323" title="#6323: Bugs: Conflicting forward declarations with versioned namespace in libstdc++. (closed: fixed)">#6323</a>. </p> <p> A lot of new failures because container forwading is now disabled for a lot of cases where it doesn't have to be. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Daniel James</dc:creator> <pubDate>Fri, 13 Jan 2012 09:00:37 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6323#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6323#comment:7</guid> <description> <p> And previously: (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/76419" title="Detail: Disable container forward declarations for recent versions of ...">[76419]</a>) Detail: Disable container forward declarations for recent versions of libstdc++. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Daniel James</dc:creator> <pubDate>Sun, 15 Jan 2012 19:56:15 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/6323#comment:8 https://svn.boost.org/trac10/ticket/6323#comment:8 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/76529" title="Detail: Merge disabled gcc container forwardings. Fixes #6323. ">[76529]</a>) Detail: Merge disabled gcc container forwardings. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6323" title="#6323: Bugs: Conflicting forward declarations with versioned namespace in libstdc++. (closed: fixed)">#6323</a>. </p> Ticket