summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/Boost/src/boost/program_options')
-rw-r--r--3rdParty/Boost/src/boost/program_options/detail/value_semantic.hpp7
-rw-r--r--3rdParty/Boost/src/boost/program_options/errors.hpp17
-rw-r--r--3rdParty/Boost/src/boost/program_options/options_description.hpp10
-rw-r--r--3rdParty/Boost/src/boost/program_options/variables_map.hpp2
4 files changed, 19 insertions, 17 deletions
diff --git a/3rdParty/Boost/src/boost/program_options/detail/value_semantic.hpp b/3rdParty/Boost/src/boost/program_options/detail/value_semantic.hpp
index 814a3db..978a38a 100644
--- a/3rdParty/Boost/src/boost/program_options/detail/value_semantic.hpp
+++ b/3rdParty/Boost/src/boost/program_options/detail/value_semantic.hpp
@@ -105,12 +105,9 @@ namespace boost { namespace program_options {
int);
#endif
// For some reason, this declaration, which is require by the standard,
- // cause gcc 3.2 to not generate code to specialization defined in
+ // cause msvc 7.1 to not generate code to specialization defined in
// value_semantic.cpp
-#if ! ( ( BOOST_WORKAROUND(__GNUC__, <= 3) &&\
- BOOST_WORKAROUND(__GNUC_MINOR__, < 3) ) || \
- ( BOOST_WORKAROUND(BOOST_MSVC, == 1310) ) \
- )
+#if ! ( BOOST_WORKAROUND(BOOST_MSVC, == 1310) )
BOOST_PROGRAM_OPTIONS_DECL void validate(boost::any& v,
const std::vector<std::string>& xs,
std::string*,
diff --git a/3rdParty/Boost/src/boost/program_options/errors.hpp b/3rdParty/Boost/src/boost/program_options/errors.hpp
index addb8d6..f31defb 100644
--- a/3rdParty/Boost/src/boost/program_options/errors.hpp
+++ b/3rdParty/Boost/src/boost/program_options/errors.hpp
@@ -25,7 +25,8 @@ namespace boost { namespace program_options {
inline std::string strip_prefixes(const std::string& text)
{
- return text.substr(text.find_last_of("-/") + 1);
+ // "--foo-bar" -> "foo-bar"
+ return text.substr(text.find_first_not_of("-/"));
}
/** Base class for all errors in the library. */
@@ -104,13 +105,13 @@ namespace boost { namespace program_options {
std::map<std::string, string_pair > m_substitution_defaults;
public:
- /** template with placeholders */
- std::string m_error_template;
+ /** template with placeholders */
+ std::string m_error_template;
- error_with_option_name(const std::string& template_,
- const std::string& option_name = "",
- const std::string& original_token = "",
- int option_style = 0);
+ error_with_option_name(const std::string& template_,
+ const std::string& option_name = "",
+ const std::string& original_token = "",
+ int option_style = 0);
/** gcc says that throw specification on dtor is loosened
* without this line
@@ -250,7 +251,7 @@ namespace boost { namespace program_options {
}
/** Does NOT set option name, because no option name makes sense */
- virtual void set_option_name(const std::string& option_name){}
+ virtual void set_option_name(const std::string&) {}
~error_with_no_option_name() throw() {}
};
diff --git a/3rdParty/Boost/src/boost/program_options/options_description.hpp b/3rdParty/Boost/src/boost/program_options/options_description.hpp
index 62530b2..32f6990 100644
--- a/3rdParty/Boost/src/boost/program_options/options_description.hpp
+++ b/3rdParty/Boost/src/boost/program_options/options_description.hpp
@@ -61,8 +61,8 @@ namespace program_options {
Alas, derived->base conversion for auto_ptr does not really work,
see
- http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2000/n1232.pdf
- http://std.dkuug.dk/jtc1/sc22/wg21/docs/cwg_defects.html#84
+ http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2000/n1232.pdf
+ http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#84
So, we have to use plain old pointers. Besides, users are not
expected to use the constructor directly.
@@ -199,6 +199,10 @@ namespace program_options {
*/
options_description& add(const options_description& desc);
+ /** Find the maximum width of the option column, including options
+ in groups. */
+ unsigned get_option_column_width() const;
+
public:
/** Returns an object of implementation-defined type suitable for adding
options to options_description. The returned object will
@@ -229,7 +233,7 @@ namespace program_options {
/** Outputs 'desc' to the specified stream, calling 'f' to output each
option_description element. */
- void print(std::ostream& os) const;
+ void print(std::ostream& os, unsigned width = 0) const;
private:
typedef std::map<std::string, int>::const_iterator name2index_iterator;
diff --git a/3rdParty/Boost/src/boost/program_options/variables_map.hpp b/3rdParty/Boost/src/boost/program_options/variables_map.hpp
index be0a4b6..09badbf 100644
--- a/3rdParty/Boost/src/boost/program_options/variables_map.hpp
+++ b/3rdParty/Boost/src/boost/program_options/variables_map.hpp
@@ -98,7 +98,7 @@ namespace boost { namespace program_options {
void store(const basic_parsed_options<char>& options,
variables_map& m, bool);
- friend BOOST_PROGRAM_OPTIONS_DECL class variables_map;
+ friend class BOOST_PROGRAM_OPTIONS_DECL variables_map;
};
/** Implements string->string mapping with convenient value casting