Use std::placeholders for json_spirit

"bind.hpp" was moved in boost-1.39. [1]

Placeholders were moved in boost 1.60. [2]

Since boost 1.73 placeholders defined in global namespace are
deprectared. [3]

Boost 1.76 added support for using std::placeholders with
boost::bind. [4]

This change uses the new, cough, location of the header and
std::placerholders for boost 1.76 plus to silence the deprecation
warning there.

Following commits are from https://github.com/boostorg/bind.git
[1] 8f507b9aeca643ca78e6a712b6d300720627c0ed
[2] db56733e4ed2125944b89e01cf36a9e451dd36f5
[3] 2797f0dc33caaae126a416bf613bd11267ba3353
[4] c85b31e3d200dda2a73cf0027a82c6d8e29066f8

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
Ralph Sennhauser
2024-10-13 18:25:11 +02:00
parent 7d6a0c695a
commit a9241f4cc7
@@ -15,9 +15,15 @@
//#define BOOST_SPIRIT_THREADSAFE // uncomment for multithreaded use, requires linking to boost.thread
#include <boost/bind.hpp>
#include <boost/function.hpp>
#include <boost/version.hpp>
#if BOOST_VERSION >= 107600
# include <boost/bind/bind.hpp>
# include <functional>
using namespace std::placeholders;
#else
# include <boost/bind.hpp>
#endif
#if BOOST_VERSION >= 103800
#include <boost/spirit/include/classic_core.hpp>