Changeset View
Changeset View
Standalone View
Standalone View
devel/boost-libs/files/patch-program_options-c++98
- This file was added.
https://github.com/boostorg/program_options/issues/65 | |||||
--- boost/program_options/detail/cmdline.hpp.orig 2018-11-09 04:04:34 UTC | |||||
+++ boost/program_options/detail/cmdline.hpp | |||||
@@ -61,11 +61,11 @@ namespace boost { namespace program_options { namespac | |||||
typedef ::boost::program_options::command_line_style::style_t style_t; | |||||
- typedef function1<std::pair<std::string, std::string>, | |||||
- const std::string&> | |||||
+ typedef function<std::pair<std::string, std::string>( | |||||
+ const std::string&)> | |||||
additional_parser; | |||||
- typedef function1<std::vector<option>, std::vector<std::string>&> | |||||
+ typedef function<std::vector<option>(std::vector<std::string>&)> | |||||
style_parser; | |||||
/** Constructs a command line parser for (argc, argv) pair. Uses | |||||
--- boost/program_options/detail/parsers.hpp.orig 2018-11-09 04:04:34 UTC | |||||
+++ boost/program_options/detail/parsers.hpp | |||||
@@ -103,8 +103,8 @@ namespace boost { namespace program_options { | |||||
parse_command_line(int argc, const charT* const argv[], | |||||
const options_description& desc, | |||||
int style, | |||||
- function1<std::pair<std::string, std::string>, | |||||
- const std::string&> ext) | |||||
+ function<std::pair<std::string, std::string>( | |||||
+ const std::string&)> ext) | |||||
{ | |||||
return basic_command_line_parser<charT>(argc, argv).options(desc). | |||||
style(style).extra_parser(ext).run(); | |||||
--- boost/program_options/parsers.hpp.orig 2018-11-09 04:04:34 UTC | |||||
+++ boost/program_options/parsers.hpp | |||||
@@ -11,7 +11,7 @@ | |||||
#include <boost/program_options/option.hpp> | |||||
#include <boost/program_options/detail/cmdline.hpp> | |||||
-#include <boost/function/function1.hpp> | |||||
+#include <boost/function.hpp> | |||||
#include <iosfwd> | |||||
#include <vector> | |||||
@@ -95,7 +95,7 @@ namespace boost { namespace program_options { | |||||
'parsed_options' */ | |||||
- typedef function1<std::pair<std::string, std::string>, const std::string&> ext_parser; | |||||
+ typedef function<std::pair<std::string, std::string>(const std::string&)> ext_parser; | |||||
/** Command line parser. | |||||
@@ -169,8 +169,8 @@ namespace boost { namespace program_options { | |||||
parse_command_line(int argc, const charT* const argv[], | |||||
const options_description&, | |||||
int style = 0, | |||||
- function1<std::pair<std::string, std::string>, | |||||
- const std::string&> ext | |||||
+ function<std::pair<std::string, std::string>( | |||||
+ const std::string&)> ext | |||||
= ext_parser()); | |||||
/** Parse a config file. | |||||
@@ -229,7 +229,7 @@ namespace boost { namespace program_options { | |||||
*/ | |||||
BOOST_PROGRAM_OPTIONS_DECL parsed_options | |||||
parse_environment(const options_description&, | |||||
- const function1<std::string, std::string>& name_mapper); | |||||
+ const function<std::string(std::string)>& name_mapper); | |||||
/** Parse environment. | |||||
@@ -243,7 +243,7 @@ namespace boost { namespace program_options { | |||||
/** @overload | |||||
This function exists to resolve ambiguity between the two above | |||||
functions when second argument is of 'char*' type. There's implicit | |||||
- conversion to both function1 and string. | |||||
+ conversion to both function and string. | |||||
*/ | |||||
BOOST_PROGRAM_OPTIONS_DECL parsed_options | |||||
parse_environment(const options_description&, const char* prefix); | |||||
--- boost/program_options/value_semantic.hpp.orig 2018-11-09 04:04:34 UTC | |||||
+++ boost/program_options/value_semantic.hpp | |||||
@@ -10,7 +10,7 @@ | |||||
#include <boost/program_options/errors.hpp> | |||||
#include <boost/any.hpp> | |||||
-#include <boost/function/function1.hpp> | |||||
+#include <boost/function.hpp> | |||||
#include <boost/lexical_cast.hpp> | |||||
#include <string> | |||||
@@ -254,7 +254,7 @@ namespace boost { namespace program_options { | |||||
/** Specifies a function to be called when the final value | |||||
is determined. */ | |||||
- typed_value* notifier(function1<void, const T&> f) | |||||
+ typed_value* notifier(function<void(const T&)> f) | |||||
{ | |||||
m_notifier = f; | |||||
return this; | |||||
@@ -370,7 +370,7 @@ namespace boost { namespace program_options { | |||||
boost::any m_implicit_value; | |||||
std::string m_implicit_value_as_text; | |||||
bool m_composing, m_implicit, m_multitoken, m_zero_tokens, m_required; | |||||
- boost::function1<void, const T&> m_notifier; | |||||
+ boost::function<void(const T&)> m_notifier; | |||||
}; | |||||
--- libs/program_options/example/env_options.cpp.orig 2018-11-09 04:04:34 UTC | |||||
+++ libs/program_options/example/env_options.cpp | |||||
@@ -27,7 +27,7 @@ void get_env_options() | |||||
; | |||||
po::variables_map vm; | |||||
- store(po::parse_environment(config, boost::function1<std::string, std::string>(mapper)), vm); | |||||
+ store(po::parse_environment(config, boost::function<std::string(std::string)>(mapper)), vm); | |||||
notify(vm); | |||||
if (vm.count("path")) | |||||
--- libs/program_options/example/options_heirarchy.cpp.orig 2018-11-09 04:04:34 UTC | |||||
+++ libs/program_options/example/options_heirarchy.cpp | |||||
@@ -220,7 +220,7 @@ class OptionsHeirarchy (private) | |||||
store(po::parse_environment(common_options, | |||||
// The next two lines are the crazy syntax to use EnvironmentMapper as | |||||
// the lookup function for env->config name conversions | |||||
- boost::function1<std::string, std::string>( | |||||
+ boost::function<std::string(std::string)>( | |||||
std::bind1st(std::mem_fun(&OptionsHeirarchy::EnvironmentMapper), this))), | |||||
results); | |||||
notify(results); | |||||
--- libs/program_options/src/parsers.cpp.orig 2018-11-09 04:04:34 UTC | |||||
+++ libs/program_options/src/parsers.cpp | |||||
@@ -196,7 +196,7 @@ namespace boost { namespace program_options { | |||||
BOOST_PROGRAM_OPTIONS_DECL parsed_options | |||||
parse_environment(const options_description& desc, | |||||
- const function1<std::string, std::string>& name_mapper) | |||||
+ const function<std::string(std::string)>& name_mapper) | |||||
{ | |||||
parsed_options result(&desc); | |||||