mirror of
https://github.com/boostorg/program_options.git
synced 2026-01-19 04:22:15 +00:00
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:
committed by
Vladimir Prus
parent
fcffe08c83
commit
a2379420f6
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user