Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

ax3l
Copy link

@ax3l ax3l commented Feb 15, 2017

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

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
@ax3l ax3l force-pushed the fix-missingBindPlaceholders branch from 4cb682a to 4bbb6a4 Compare February 15, 2017 23:07
@@ -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),
Copy link
Author

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.

Copy link

@jowenshaw jowenshaw Dec 14, 2017

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>

Copy link
Author

@ax3l ax3l Dec 14, 2017

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)

@Osyotr
Copy link
Contributor

Osyotr commented Oct 8, 2019

Bump.

@ax3l
Copy link
Author

ax3l commented Oct 8, 2019

@grafikrobot you merged last to master, so I ping you on my two year old fix, fixing this include-what-you-use bug ;)

@ax3l
Copy link
Author

ax3l commented Oct 8, 2019

cc @CornedBee as Trac issue owner :)

@Osyotr
Copy link
Contributor

Osyotr commented Apr 2, 2020

Ah sh*t, here we go again.
Updating boost to 1.72, still bumping into this PR.

@grafikrobot
Copy link
Member

Unfortunately.. I don't have permissions to do anything about this PR.

@ax3l
Copy link
Author

ax3l commented Apr 2, 2020

@CornedBee can you merge this please?

@Osyotr
Copy link
Contributor

Osyotr commented Jun 25, 2020

Looks like it's fixed in #50!

@ax3l
Copy link
Author

ax3l commented Jun 26, 2020

Yay! :)

@ax3l ax3l closed this Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants