New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON Parser: Missing Bind Placeholders #26
Conversation
Fixes missing placeholder includes to `boost::bind`. ``` boost/property_tree/json_parser/detail/parser.hpp(217): error: identifier "_1" is undefined boost/property_tree/json_parser/detail/parser.hpp(520): error: identifier "_1" is undefined ``` Reported in https://svn.boost.org/trac/boost/ticket/12841
4cb682a
to
4bbb6a4
Compare
@@ -214,7 +215,8 @@ namespace boost { namespace property_tree { | |||
void process_codepoint(Sentinel end, EncodingErrorFn error_fn) { | |||
encoding.transcode_codepoint(cur, end, | |||
boost::bind(&Callbacks::on_code_unit, | |||
boost::ref(callbacks), _1), | |||
boost::ref(callbacks), | |||
boost::placeholders::_1), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one might want this part as explicit as here, since some user code might have BOOST_BIND_NO_PLACEHOLDERS
defined.
same in the line below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use libboost1.63 and met the same problem today. After using the above patch, there is still an building error: ‘boost::placeholders’ has not been declared. I solved it by adding the following including file: #include <boost/bind/placeholders.hpp>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great to hear it helps you!
note that this patch also adds the include you mention include :) (see the "Files changed" tab)
Bump. |
@grafikrobot you merged last to master, so I ping you on my two year old fix, fixing this include-what-you-use bug ;) |
cc @CornedBee as Trac issue owner :) |
Ah sh*t, here we go again. |
Unfortunately.. I don't have permissions to do anything about this PR. |
@CornedBee can you merge this please? |
Looks like it's fixed in #50! |
Yay! :) |
Fixes missing placeholder includes to
boost::bind
.Reported in
https://svn.boost.org/trac/boost/ticket/12841