From 66bf260267765bcb2829c772f3bc9cb7ef31abeb Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 26 Jun 2020 22:26:40 +0800 Subject: [PATCH] json_spirit: avoid using bind placeholders in global namespace MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit to silence the warning from boost v1.73, like json_spirit/json_spirit_reader.cpp:7: /opt/ceph/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’ 36 | BOOST_PRAGMA_MESSAGE( | ^~~~~~~~~~~~~~~~~~~~ Signed-off-by: Kefu Chai --- src/json_spirit/json_spirit_reader_template.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/json_spirit/json_spirit_reader_template.h b/src/json_spirit/json_spirit_reader_template.h index 2d0b3a440e6..7d394b26e7d 100644 --- a/src/json_spirit/json_spirit_reader_template.h +++ b/src/json_spirit/json_spirit_reader_template.h @@ -17,7 +17,7 @@ #define BOOST_SPIRIT_THREADSAFE // uncomment for multithreaded use, requires linking to boost.thread -#include +#include #include #include @@ -211,6 +211,8 @@ namespace json_spirit return get_str( tmp.begin(), tmp.end() ); } + using namespace boost::placeholders; + // this class's methods get called by the spirit parse resulting // in the creation of a JSON object or array // -- 2.39.5