Avoid deprecated bind placeholders in global namespace

This fixes numerous compilation warnings:

  note: #pragma message:
    The practice of declaring the Bind placeholders (_1, _2, ...)
    in the global namespace is deprecated.
    Please use <boost/bind/bind.hpp> + using namespace boost::placeholders,
    or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.
This commit is contained in:
Mateusz Łoskot
2020-03-06 08:45:25 +01:00
committed by Vladimir Prus
parent fcffe08c83
commit a2379420f6
3 changed files with 7 additions and 3 deletions

View File

@@ -15,7 +15,7 @@
#include <boost/program_options/positional_options.hpp>
#include <boost/throw_exception.hpp>
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <string>
#include <utility>
@@ -29,6 +29,8 @@
#include <iostream>
using namespace boost::placeholders;
namespace boost { namespace program_options {
using namespace std;

View File

@@ -19,9 +19,10 @@
#include <boost/program_options/detail/utf8_codecvt_facet.hpp>
#include <boost/throw_exception.hpp>
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
using namespace std;
using namespace boost::placeholders;
namespace boost { namespace detail {

View File

@@ -16,7 +16,7 @@
#include <boost/program_options/environment_iterator.hpp>
#include <boost/program_options/detail/convert.hpp>
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/throw_exception.hpp>
#include <cctype>
@@ -61,6 +61,7 @@ extern char** environ;
#endif
using namespace std;
using namespace boost::placeholders;
namespace boost { namespace program_options {