From 4cb682aa9ed270f890b73a2450decab777c777d0 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Wed, 15 Feb 2017 23:56:24 +0100 Subject: [PATCH] JSON Parser: Missing Bind Placeholders 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 --- include/boost/property_tree/json_parser/detail/parser.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/boost/property_tree/json_parser/detail/parser.hpp b/include/boost/property_tree/json_parser/detail/parser.hpp index 5554990..c2edffc 100644 --- a/include/boost/property_tree/json_parser/detail/parser.hpp +++ b/include/boost/property_tree/json_parser/detail/parser.hpp @@ -6,6 +6,8 @@ #include #include #include +#include +#include #include #include @@ -214,7 +216,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), error_fn); } @@ -517,7 +520,8 @@ namespace boost { namespace property_tree { void feed(unsigned codepoint) { encoding.feed_codepoint(codepoint, boost::bind(&Callbacks::on_code_unit, - boost::ref(callbacks), _1)); + boost::ref(callbacks), + boost::placeholders::_1)); } Callbacks& callbacks; -- 2.1.4