Boost C++ Libraries: Ticket #9508: 1.54 regression: boost/thread/once.hpp includes boost/placeholders.hpp https://svn.boost.org/trac10/ticket/9508 <pre class="wiki">#include &lt;functional&gt; #include &lt;boost/thread/once.hpp&gt; using namespace std::placeholders; static int x = sizeof(_1); </pre><p> The code above compiles in C++11 mode on boost 1.53, but it fails on boost 1.54 like this: </p> <pre class="wiki">boost_bind_bug.cpp:6:23: error: reference to ‘_1’ is ambiguous static int x = sizeof(_1); ^ In file included from boost_bind_bug.cpp:1:0: /usr/include/c++/4.8.2/functional:1004:34: note: candidates are: const std::_Placeholder&lt;1&gt; std::placeholders::_1 extern const _Placeholder&lt;1&gt; _1; ^ In file included from /usr/include/boost/bind/bind.hpp:1742:0, from /usr/include/boost/bind.hpp:22, from /usr/include/boost/thread/pthread/once_atomic.hpp:19, from /usr/include/boost/thread/once.hpp:20, from boost_bind_bug.cpp:2: /usr/include/boost/bind/placeholders.hpp:55:15: note: boost::arg&lt;1&gt; {anonymous}::_1 boost::arg&lt;1&gt; _1; ^ </pre><p> This magic inclusion of boost/bind/placeholders.hpp is extremely impolite. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9508 Trac 1.4.3 viboes Mon, 13 Jan 2014 22:05:14 GMT component changed; owner set https://svn.boost.org/trac10/ticket/9508#comment:1 https://svn.boost.org/trac10/ticket/9508#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Peter Dimov</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">bind</span> </li> </ul> <p> Well, Boost.Thread uses boost::bind, so I don't see where is the problem. The problem is that _1 is on the global namespace. </p> <p> Moved to bind. </p> Ticket