Subject: [Boost-bugs] [Boost C++ Libraries] #9508: 1.54 regression: boost/thread/once.hpp includes boost/placeholders.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-12-19 02:22:06
#9508: 1.54 regression: boost/thread/once.hpp includes boost/placeholders.hpp
------------------------+------------------------------
Reporter: luto@⦠| Type: Bugs
Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.54.0
Severity: Regression | Keywords:
------------------------+------------------------------
{{{
#include <functional>
#include <boost/thread/once.hpp>
using namespace std::placeholders;
static int x = sizeof(_1);
}}}
The code above compiles in C++11 mode on boost 1.53, but it fails on boost
1.54 like this:
{{{
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<1> std::placeholders::_1
extern const _Placeholder<1> _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<1> {anonymous}::_1
boost::arg<1> _1;
^
}}}
This magic inclusion of boost/bind/placeholders.hpp is extremely impolite.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9508> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:15 UTC