Boost C++ Libraries: Ticket #12706: missing including to restriction namespace boost placeholders conflicting with C++ std::placeholders https://svn.boost.org/trac10/ticket/12706 <p> hpp file: <strong>include/boost/property_tree/detail/json_parser/parser.hpp</strong> </p> <p> effect boost version: <strong>1.59 ~ 1.62</strong> </p> <p> solutions: add "#include &lt;boost/bind/placeholders.hpp&gt;" in parser.hpp </p> <p> here is compiling errors for this case: [ 62%] Building CXX object src/lib/explorer/CMakeFiles/explorer_static.dir/command_extension.cpp.o cd /home/jiang/source/mvs-private/build/src/lib/explorer &amp;&amp; /usr/bin/c++ -DBCX_STATIC=1 -DMVS_DEBUG=1 -I/usr/local/include -I/home/jiang/source/mvs-private/contrib -I/home/jiang/source/mvs-private/include -std=c++11 -static-libstdc++ -fstrict-aliasing -fvisibility=hidden -Wall -Werror -Wextra -Wstrict-aliasing=2 -Wno-unused-parameter -Wno-unused-variable -Wno-type-limits -pthread -fno-enforce-eh-specs -fnothrow-opt -Wno-reorder -Wno-ignored-qualifiers -Wno-unused-function -Wno-unused-but-set-variable -Wno-sign-compare -Wno-unused-but-set-parameter -g -o CMakeFiles/explorer_static.dir/command_extension.cpp.o -c /home/jiang/source/mvs-private/src/lib/explorer/command_extension.cpp In file included from /usr/local/include/boost/property_tree/detail/json_parser/read.hpp:13:0, </p> <blockquote> <p> from /usr/local/include/boost/property_tree/json_parser.hpp:16, from /home/jiang/source/mvs-private/src/lib/explorer/command_assistant.cpp:5: </p> </blockquote> <p> /usr/local/include/boost/property_tree/detail/json_parser/parser.hpp: In member function ‘void boost::property_tree::json_parser::detail::string_callback_adapter&lt;Callbacks, Encoding, Iterator, std::input_iterator_tag&gt;::process_codepoint(Sentinel, <a class="missing wiki">EncodingErrorFn</a>)’: /usr/local/include/boost/property_tree/detail/json_parser/parser.hpp:211:52: error: ‘_1’ was not declared in this scope </p> <blockquote> <p> boost::ref(callbacks), _1), </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/local/include/boost/property_tree/detail/json_parser/parser.hpp:211:52: note: suggested alternatives: In file included from /usr/include/c++/5/memory:79:0, </p> <blockquote> <p> from /home/jiang/source/mvs-private/include/bitcoin/bitcoin/utility/monitor.hpp:25, from /home/jiang/source/mvs-private/include/bitcoin/bitcoin/utility/assert.hpp:38, from /home/jiang/source/mvs-private/include/bitcoin/bitcoin/impl/utility/data.ipp:26, from /home/jiang/source/mvs-private/include/bitcoin/bitcoin/utility/data.hpp:155, from /home/jiang/source/mvs-private/include/bitcoin/bitcoin/message/network_address.hpp:27, from /home/jiang/source/mvs-private/include/bitcoin/bitcoin/constants.hpp:27, from /home/jiang/source/mvs-private/include/bitcoin/bitcoin.hpp:19, from /home/jiang/source/mvs-private/include/bitcoin/explorer/dispatch.hpp:24, from /home/jiang/source/mvs-private/src/lib/explorer/command_assistant.cpp:3: </p> </blockquote> <p> /usr/include/c++/5/functional:782:34: note: ‘std::placeholders::_1’ </p> <blockquote> <p> extern const _Placeholder&lt;1&gt; _1; </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> In file included from /usr/local/include/boost/mpl/aux_/include_preprocessed.hpp:37:0, </p> <blockquote> <p> from /usr/local/include/boost/mpl/placeholders.hpp:43, from /usr/local/include/boost/mpl/apply.hpp:24, from /usr/local/include/boost/mpl/aux_/iter_apply.hpp:17, from /usr/local/include/boost/mpl/aux_/find_if_pred.hpp:14, from /usr/local/include/boost/mpl/find_if.hpp:17, from /usr/local/include/boost/multiprecision/number.hpp:13, from /usr/local/include/boost/multiprecision/cpp_int.hpp:12, from /home/jiang/source/mvs-private/include/bitcoin/bitcoin/chain/header.hpp:23, from /home/jiang/source/mvs-private/include/bitcoin/bitcoin/chain/block.hpp:28, from /home/jiang/source/mvs-private/include/bitcoin/bitcoin/message/block_message.hpp:27, from /home/jiang/source/mvs-private/include/bitcoin/bitcoin/messages.hpp:27, from /home/jiang/source/mvs-private/include/bitcoin/bitcoin.hpp:23, from /home/jiang/source/mvs-private/include/bitcoin/explorer/dispatch.hpp:24, from /home/jiang/source/mvs-private/src/lib/explorer/command_assistant.cpp:3: </p> </blockquote> <p> /usr/local/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp:29:16: note: ‘mpl_::_1’ </p> <blockquote> <p> typedef arg&lt;1&gt; _1; </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/local/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp:29:16: note: ‘mpl_::_1’ /usr/local/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp:29:16: note: ‘mpl_::_1’ In file included from /usr/local/include/boost/property_tree/detail/json_parser/read.hpp:13:0, </p> <blockquote> <p> from /usr/local/include/boost/property_tree/json_parser.hpp:16, from /home/jiang/source/mvs-private/src/lib/explorer/command_assistant.cpp:5: </p> </blockquote> <p> /usr/local/include/boost/property_tree/detail/json_parser/parser.hpp: In member function ‘void boost::property_tree::json_parser::detail::parser&lt;Callbacks, Encoding, Iterator, Sentinel&gt;::feed(unsigned int)’: /usr/local/include/boost/property_tree/detail/json_parser/parser.hpp:514:72: error: ‘_1’ was not declared in this scope </p> <blockquote> <p> boost::ref(callbacks), _1)); </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/local/include/boost/property_tree/detail/json_parser/parser.hpp:514:72: note: suggested alternatives: In file included from /usr/include/c++/5/memory:79:0, </p> <blockquote> <p> from /home/jiang/source/mvs-private/include/bitcoin/bitcoin/utility/monitor.hpp:25, from /home/jiang/source/mvs-private/include/bitcoin/bitcoin/utility/assert.hpp:38, from /home/jiang/source/mvs-private/include/bitcoin/bitcoin/impl/utility/data.ipp:26, from /home/jiang/source/mvs-private/include/bitcoin/bitcoin/utility/data.hpp:155, from /home/jiang/source/mvs-private/include/bitcoin/bitcoin/message/network_address.hpp:27, from /home/jiang/source/mvs-private/include/bitcoin/bitcoin/constants.hpp:27, from /home/jiang/source/mvs-private/include/bitcoin/bitcoin.hpp:19, from /home/jiang/source/mvs-private/include/bitcoin/explorer/dispatch.hpp:24, from /home/jiang/source/mvs-private/src/lib/explorer/command_assistant.cpp:3: </p> </blockquote> <p> /usr/include/c++/5/functional:782:34: note: ‘std::placeholders::_1’ </p> <blockquote> <p> extern const _Placeholder&lt;1&gt; _1; </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> In file included from /usr/local/include/boost/mpl/aux_/include_preprocessed.hpp:37:0, </p> <blockquote> <p> from /usr/local/include/boost/mpl/placeholders.hpp:43, from /usr/local/include/boost/mpl/apply.hpp:24, from /usr/local/include/boost/mpl/aux_/iter_apply.hpp:17, from /usr/local/include/boost/mpl/aux_/find_if_pred.hpp:14, from /usr/local/include/boost/mpl/find_if.hpp:17, from /usr/local/include/boost/multiprecision/number.hpp:13, from /usr/local/include/boost/multiprecision/cpp_int.hpp:12, from /home/jiang/source/mvs-private/include/bitcoin/bitcoin/chain/header.hpp:23, from /home/jiang/source/mvs-private/include/bitcoin/bitcoin/chain/block.hpp:28, from /home/jiang/source/mvs-private/include/bitcoin/bitcoin/message/block_message.hpp:27, from /home/jiang/source/mvs-private/include/bitcoin/bitcoin/messages.hpp:27, from /home/jiang/source/mvs-private/include/bitcoin/bitcoin.hpp:23, from /home/jiang/source/mvs-private/include/bitcoin/explorer/dispatch.hpp:24, from /home/jiang/source/mvs-private/src/lib/explorer/command_assistant.cpp:3: </p> </blockquote> <p> /usr/local/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp:29:16: note: ‘mpl_::_1’ </p> <blockquote> <p> typedef arg&lt;1&gt; _1; </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/local/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp:29:16: note: ‘mpl_::_1’ /usr/local/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp:29:16: note: ‘mpl_::_1’ src/lib/explorer/CMakeFiles/explorer_static.dir/build.make:89: recipe for target 'src/lib/explorer/CMakeFiles/explorer_static.dir/command_assistant.cpp.o' failed </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12706 Trac 1.4.3