-
Notifications
You must be signed in to change notification settings - Fork 425
Description
Our project is using BOOST_BIND_NO_PLACEHOLDERS
because of frequent clashes with C++11 placeholders. When including cpp-netlib headers (boost/network/protocol/http/client.hpp
), the project doesn't compile because the code expects placeholders to be accessible without qualifiers.
An example error looks as follows:
deps/cpp-netlib/cpp-netlibBuild-prefix/include/boost/network/protocol/http/policies/async_connection.hpp:83:39: error: ‘_4’ was not declared in this scope
this, _1, _2, _3, _4),
^
Because BOOST_BIND_NO_PLACEHOLDERS
, boost::arg<N>()
, boost::is_placeholder
are undocumented (as per this thread on Boost mailing list) I'm not sure what would be the best way to solve the problem on cpp-netlib's side.
One workaround on our project's side is to pull (This works as long as you're not using any cpp-netlib functions.) Of course, one other approach would be to undefine std::placeholders
into the global namespace before including cpp-netlib headers.BOOST_BIND_NO_PLACEHOLDERS
and always qualify std::placeholders
.