Boost C++ Libraries: Ticket #6062: Incompatibility boost.unordered and boost.asio. https://svn.boost.org/trac10/ticket/6062 <p> Program: </p> <pre class="wiki">#include &lt;boost/asio.hpp&gt; #include &lt;boost/unordered_map.hpp&gt; int main() { boost::unordered_map&lt;void* , void* &gt; umap; return 0; } </pre><p> leads to errors (GCC 4.5.1): </p> <pre class="wiki">phprus@notebook-hp6360b:~/science/workspace/Boost/testcase/1.48.0.beta1&gt; gcc -I/home/phprus/opt/icmm/boost/1.48.0.beta1/include -c unorgered.cpp In file included from /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/buckets.hpp:16:0, from /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/table.hpp:10, from /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/equivalent.hpp:14, from /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/unordered_map.hpp:18, from /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered_map.hpp:16, from unorgered.cpp:2: /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected unqualified-id before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected ‘;’ before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected unqualified-id before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected unqualified-id before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected ‘)’ before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected unqualified-id before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected ‘;’ before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected unqualified-id before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected unqualified-id before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected ‘)’ before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected unqualified-id before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected ‘;’ before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected unqualified-id before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected unqualified-id before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected ‘)’ before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected unqualified-id before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected ‘;’ before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected unqualified-id before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected unqualified-id before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected ‘)’ before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected unqualified-id before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected ‘;’ before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected unqualified-id before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected unqualified-id before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected ‘)’ before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected unqualified-id before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected ‘;’ before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected unqualified-id before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected unqualified-id before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected ‘)’ before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected unqualified-id before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected ‘;’ before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected unqualified-id before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected unqualified-id before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected ‘)’ before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected unqualified-id before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected ‘;’ before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected unqualified-id before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected unqualified-id before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected ‘)’ before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected unqualified-id before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected ‘;’ before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected unqualified-id before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected unqualified-id before numeric constant /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp:135:1: error: expected ‘)’ before numeric constant </pre><p> or errors (Intel C++ 12.0.4): </p> <pre class="wiki">phprus@notebook-hp6360b:~/science/workspace/Boost/testcase/1.48.0.beta1&gt; icpc -I/home/phprus/opt/icmm/boost/1.48.0.beta1/include -c unorgered.cpp /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/move/move.hpp(236): warning #1292: attribute "__may_alias__" ignored } BOOST_MOVE_ATTRIBUTE_MAY_ALIAS; ^ /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp(134): error: expected an identifier BOOST_PP_REPEAT_FROM_TO(1, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EARGS, ^ /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp(134): error: expected a declaration BOOST_PP_REPEAT_FROM_TO(1, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EARGS, ^ /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp(134): error: invalid type for a bit field BOOST_PP_REPEAT_FROM_TO(1, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EARGS, ^ /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp(134): error: identifier "a0" is undefined BOOST_PP_REPEAT_FROM_TO(1, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EARGS, ^ /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp(134): error: function call is not allowed in a constant expression BOOST_PP_REPEAT_FROM_TO(1, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EARGS, ^ /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp(134): error: expression must have a constant value BOOST_PP_REPEAT_FROM_TO(1, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EARGS, ^ /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp(134): error: expected a ";" BOOST_PP_REPEAT_FROM_TO(1, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EARGS, ^ /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp(134): error: expected a ")" BOOST_PP_REPEAT_FROM_TO(1, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EARGS, ^ /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp(134): error: "B1" has already been declared in the current scope BOOST_PP_REPEAT_FROM_TO(1, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EARGS, ^ /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/unordered/detail/emplace_args.hpp(134): warning #411: class template "boost::unordered::detail::emplace_args2&lt;A0, A1&gt;" defines no constructor to initialize the following: reference member "boost::unordered::detail::emplace_args2&lt;A0, A1&gt;::a1" BOOST_PP_REPEAT_FROM_TO(1, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EARGS, ^ /home/phprus/opt/icmm/boost/1.48.0.beta1/include/boost/array.hpp(121): warning #279: controlling expression is constant BOOST_ASSERT( i &lt; N &amp;&amp; "out of range" ); ^ compilation aborted for unorgered.cpp (code 2) </pre><p> OS: openSUSE 11.4 x86_64. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6062 Trac 1.4.3 Daniel James Wed, 26 Oct 2011 17:47:10 GMT status changed https://svn.boost.org/trac10/ticket/6062#comment:1 https://svn.boost.org/trac10/ticket/6062#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> Looks like the macro <code>B0</code> is defined by something included by asio. I'll rename it, won't be in the beta though. </p> Ticket Vladislav <phprus@…> Wed, 26 Oct 2011 18:01:25 GMT <link>https://svn.boost.org/trac10/ticket/6062#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6062#comment:2</guid> <description> <p> In release 1.48.0 this bug will be fixed? </p> <p> Please send a patch for the beta-version that I could test remaining, used by me, Boost libraries. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Daniel James</dc:creator> <pubDate>Wed, 26 Oct 2011 21:31:30 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6062#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6062#comment:3</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/75123" title="Unordered: Rename B0, B1 etc. to avoid macro clash. Refs #6062. ">[75123]</a>) Unordered: Rename B0, B1 etc. to avoid macro clash. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6062" title="#6062: Bugs: Incompatibility boost.unordered and boost.asio. (closed: fixed)">#6062</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 26 Oct 2011 21:33:47 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/6062 https://svn.boost.org/trac10/ticket/6062 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">unordered.patch</span> </li> </ul> Ticket anonymous Tue, 08 Nov 2011 15:00:34 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/6062#comment:4 https://svn.boost.org/trac10/ticket/6062#comment:4 <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> Fixed in <a class="changeset" href="https://svn.boost.org/trac10/changeset/75293" title="Merge to release several changes for 1.48. ">[75293]</a>. </p> Ticket