Skip to content

Commit c268d04

Browse files
committed
Remove unnecessary includes of boost/bind.hpp, replace standard function wrappers.
boost/bind.hpp generates deprecation warnings about global placeholder argument keywords. Removes the unnecessary includes of it. Also, this commit replaces standard function object wrappers, which were removed from C++20, with boost::bind.
1 parent 5f233f0 commit c268d04

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

example/options_heirarchy.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@
2121
//
2222

2323
#include <boost/program_options.hpp>
24-
namespace po = boost::program_options;
2524
#include <string>
2625
#include <iostream>
2726
#include <map>
2827
#include <stdexcept>
2928
#include <fstream>
29+
#include <boost/bind/bind.hpp>
30+
31+
namespace po = boost::program_options;
3032

3133
const std::string version("1.0");
3234

@@ -221,7 +223,7 @@ class OptionsHeirarchy
221223
// The next two lines are the crazy syntax to use EnvironmentMapper as
222224
// the lookup function for env->config name conversions
223225
boost::function1<std::string, std::string>(
224-
std::bind1st(std::mem_fun(&OptionsHeirarchy::EnvironmentMapper), this))),
226+
boost::bind(&OptionsHeirarchy::EnvironmentMapper, this))),
225227
results);
226228
notify(results);
227229
}

test/test_convert.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
#include <sstream>
1414
#include <iostream>
1515
#include <boost/progress.hpp>
16-
#include <boost/bind.hpp>
17-
#include <boost/ref.hpp>
1816

1917
#include <boost/program_options/detail/convert.hpp>
2018
#include <boost/program_options/detail/utf8_codecvt_facet.hpp>

0 commit comments

Comments
 (0)