Ticket #12841: 0001-JSON-Parser-Missing-Bind-Placeholders.patch

File 0001-JSON-Parser-Missing-Bind-Placeholders.patch, 2.0 KB (added by a.huebl@…, 6 years ago)

Patch to fix compile error

  • include/boost/property_tree/json_parser/detail/parser.hpp

    From 4cb682aa9ed270f890b73a2450decab777c777d0 Mon Sep 17 00:00:00 2001
    From: Axel Huebl <axel.huebl@plasma.ninja>
    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 b  
    66#include <boost/ref.hpp>
    77#include <boost/bind.hpp>
    88#include <boost/format.hpp>
     9#include <boost/bind.hpp>
     10#include <boost/bind/placeholders.hpp>
    911
    1012#include <iterator>
    1113#include <sstream>
    namespace boost { namespace property_tree {  
    214216        void process_codepoint(Sentinel end, EncodingErrorFn error_fn) {
    215217            encoding.transcode_codepoint(cur, end,
    216218                boost::bind(&Callbacks::on_code_unit,
    217                             boost::ref(callbacks), _1),
     219                            boost::ref(callbacks),
     220                            boost::placeholders::_1),
    218221                error_fn);
    219222        }
    220223
    namespace boost { namespace property_tree {  
    517520        void feed(unsigned codepoint) {
    518521            encoding.feed_codepoint(codepoint,
    519522                                    boost::bind(&Callbacks::on_code_unit,
    520                                                 boost::ref(callbacks), _1));
     523                                                boost::ref(callbacks),
     524                                                boost::placeholders::_1));
    521525        }
    522526
    523527        Callbacks& callbacks;