Compare commits

...

6 Commits

Author SHA1 Message Date
Beman Dawes
f401dd75cb Release 1.49.0
[SVN r77094]
2012-02-22 22:08:43 +00:00
Jürgen Hunold
c054a3b034 Merge 73299,73301,73308 from ^/trunk
------------------------------------------------------------------------
r73299 | jhunold | 2011-07-22 14:08:03 +0200 (Fr, 22 Jul 2011) | 2 lines

Enable visibility support. Refs #2114.

------------------------------------------------------------------------
r73301 | jhunold | 2011-07-22 16:15:45 +0200 (Fr, 22 Jul 2011) | 2 lines

Enable visibility support. Refs #2114.

------------------------------------------------------------------------
r73308 | jhunold | 2011-07-23 11:24:35 +0200 (Sa, 23 Jul 2011) | 2 lines

Enable visibility support. Refs #2114.

------------------------------------------------------------------------


[SVN r73381]
2011-07-26 17:40:21 +00:00
Marshall Clow
cf09cfde1f Merging fixes for #3909 to release branch
[SVN r68077]
2011-01-13 01:46:49 +00:00
Marshall Clow
ec3192a6c8 fix typo
[SVN r67037]
2010-12-05 20:39:48 +00:00
Marshall Clow
abd32c88fc Merge doc patches to release; fixes #3992, fixes #4858
[SVN r67034]
2010-12-05 20:36:54 +00:00
Jürgen Hunold
0c04bde7e0 Merge 65318,65319 from ^/trunk
------------------------------------------------------------------------
r65318 | jhunold | 2010-09-06 10:43:06 +0200 (Mo, 06 Sep 2010) | 3 lines

Suppress msvc warning 4251 about templates as base classes not having a dll-interface.
Suppress msvc warning 4275 about base class std::logic_error not having a dll-interface.

------------------------------------------------------------------------
r65319 | jhunold | 2010-09-06 16:14:09 +0200 (Mo, 06 Sep 2010) | 2 lines

Fix: windows does not have wait(), use own macros instead.

------------------------------------------------------------------------


[SVN r65326]
2010-09-07 05:52:45 +00:00
10 changed files with 57 additions and 14 deletions

View File

@@ -115,7 +115,8 @@ if (vm.count("response-file")) {
ss << ifs.rdbuf();
// Split the file content
char_separator<char> sep(" \n\r");
tokenizer<char_separator<char> > tok(ss.str(), sep);
std::string ResponsefileContents( ss.str() );
tokenizer<char_separator<char> > tok(ResponsefileContents, sep);
vector<string> args;
copy(tok.begin(), tok.end(), back_inserter(args));
// Parse the file and store the options
@@ -295,7 +296,7 @@ void validate(boost::any& v,
if (regex_match(s, match, r)) {
v = any(magic_number(lexical_cast<int>(match[1])));
} else {
throw validation_error("invalid value");
throw validation_error(validation_error::invalid_option_value);
}
}
]]>

View File

@@ -34,17 +34,14 @@
#endif // BOOST_VERSION
///////////////////////////////////////////////////////////////////////////////
// Windows DLL suport
#ifdef BOOST_HAS_DECLSPEC
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_PROGRAM_OPTIONS_DYN_LINK)
// export if this is our own source, otherwise import:
#ifdef BOOST_PROGRAM_OPTIONS_SOURCE
# define BOOST_PROGRAM_OPTIONS_DECL __declspec(dllexport)
# define BOOST_PROGRAM_OPTIONS_DECL BOOST_SYMBOL_EXPORT
#else
# define BOOST_PROGRAM_OPTIONS_DECL __declspec(dllimport)
# define BOOST_PROGRAM_OPTIONS_DECL BOOST_SYMBOL_IMPORT
#endif // BOOST_PROGRAM_OPTIONS_SOURCE
#endif // DYN_LINK
#endif // BOOST_HAS_DECLSPEC
#ifndef BOOST_PROGRAM_OPTIONS_DECL
#define BOOST_PROGRAM_OPTIONS_DECL

View File

@@ -22,6 +22,11 @@
#include <string>
#include <vector>
#if defined(BOOST_MSVC)
# pragma warning (push)
# pragma warning (disable:4251) // class 'std::vector<_Ty>' needs to have dll-interface to be used by clients of class 'boost::program_options::positional_options_description'
#endif
namespace boost { namespace program_options { namespace detail {
/** Command line parser class. Main requirements were:
@@ -134,5 +139,9 @@ namespace boost { namespace program_options { namespace detail {
}}}
#if defined(BOOST_MSVC)
# pragma warning (pop)
#endif
#endif

View File

@@ -36,11 +36,11 @@ namespace boost { namespace program_options {
template<class charT>
basic_command_line_parser<charT>::
basic_command_line_parser(int argc, charT* argv[])
basic_command_line_parser(int argc, const charT* const argv[])
: detail::cmdline(
// Explicit template arguments are required by gcc 3.3.1
// (at least mingw version), and do no harm on other compilers.
to_internal(detail::make_vector<charT, charT**>(argv+1, argv+argc+!argc)))
to_internal(detail::make_vector<charT, const charT* const*>(argv+1, argv+argc+!argc)))
{}
@@ -111,7 +111,7 @@ namespace boost { namespace program_options {
template<class charT>
basic_parsed_options<charT>
parse_command_line(int argc, charT* argv[],
parse_command_line(int argc, const charT* const argv[],
const options_description& desc,
int style,
function1<std::pair<std::string, std::string>,

View File

@@ -13,7 +13,11 @@
#include <stdexcept>
#include <vector>
#if defined(BOOST_MSVC)
# pragma warning (push)
# pragma warning (disable:4275) // non dll-interface class 'std::logic_error' used as base for dll-interface class 'boost::program_options::error'
# pragma warning (disable:4251) // class 'std::vector<_Ty>' needs to have dll-interface to be used by clients of class 'boost::program_options::ambiguous_option'
#endif
namespace boost { namespace program_options {
@@ -232,5 +236,8 @@ namespace boost { namespace program_options {
};
}}
#if defined(BOOST_MSVC)
# pragma warning (pop)
#endif
#endif

View File

@@ -25,6 +25,12 @@
#include <iosfwd>
#if defined(BOOST_MSVC)
# pragma warning (push)
# pragma warning (disable:4251) // class 'boost::shared_ptr<T>' needs to have dll-interface to be used by clients of class 'boost::program_options::option_description'
#endif
/** Boost namespace */
namespace boost {
/** Namespace for the library. */
@@ -251,4 +257,8 @@ namespace program_options {
};
}}
#if defined(BOOST_MSVC)
# pragma warning (pop)
#endif
#endif

View File

@@ -17,6 +17,11 @@
#include <vector>
#include <utility>
#if defined(BOOST_MSVC)
# pragma warning (push)
# pragma warning (disable:4251) // class 'std::vector<_Ty>' needs to have dll-interface to be used by clients of class 'boost::program_options::basic_parsed_options<wchar_t>'
#endif
namespace boost { namespace program_options {
class options_description;
@@ -95,7 +100,7 @@ namespace boost { namespace program_options {
/** Creates a command line parser for the specified arguments
list. The parameters should be the same as passed to 'main'.
*/
basic_command_line_parser(int argc, charT* argv[]);
basic_command_line_parser(int argc, const charT* const argv[]);
/** Sets options descriptions to use. */
basic_command_line_parser& options(const options_description& desc);
@@ -139,7 +144,7 @@ namespace boost { namespace program_options {
*/
template<class charT>
basic_parsed_options<charT>
parse_command_line(int argc, charT* argv[],
parse_command_line(int argc, const charT* const argv[],
const options_description&,
int style = 0,
function1<std::pair<std::string, std::string>,

View File

@@ -11,6 +11,11 @@
#include <vector>
#include <string>
#if defined(BOOST_MSVC)
# pragma warning (push)
# pragma warning (disable:4251) // class 'std::vector<_Ty>' needs to have dll-interface to be used by clients of class 'boost::program_options::positional_options_description'
#endif
namespace boost { namespace program_options {
/** Describes positional options.
@@ -61,5 +66,9 @@ namespace boost { namespace program_options {
}}
#if defined(BOOST_MSVC)
# pragma warning (pop)
#endif
#endif

View File

@@ -16,6 +16,11 @@
#include <map>
#include <set>
#if defined(BOOST_MSVC)
# pragma warning (push)
# pragma warning (disable:4251) // 'boost::program_options::variable_value::v' : class 'boost::any' needs to have dll-interface to be used by clients of class 'boost::program_options::variable_value
#endif
namespace boost { namespace program_options {
template<class charT>

View File

@@ -131,7 +131,7 @@ void test_command_line()
// Regression test: check that '0' as style is interpreted as
// 'default_style'
vector<option> a4 =
parse_command_line(sizeof(cmdline3_)/sizeof(const char*), const_cast<char**>(cmdline3_),
parse_command_line(sizeof(cmdline3_)/sizeof(const char*), cmdline3_,
desc, 0, additional_parser).options;
BOOST_CHECK_EQUAL(a4.size(), 4u);