Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68077 - in branches/release: boost/program_options boost/program_options/detail libs/program_options/test
From: marshall_at_[hidden]
Date: 2011-01-12 20:46:53


Author: marshall
Date: 2011-01-12 20:46:49 EST (Wed, 12 Jan 2011)
New Revision: 68077
URL: http://svn.boost.org/trac/boost/changeset/68077

Log:
Merging fixes for #3909 to release branch
Properties modified:
   branches/release/boost/program_options/detail/parsers.hpp (contents, props changed)
   branches/release/boost/program_options/parsers.hpp (contents, props changed)
   branches/release/libs/program_options/test/parsers_test.cpp (contents, props changed)
Text files modified:
   branches/release/boost/program_options/detail/parsers.hpp | 6 +++---
   branches/release/boost/program_options/parsers.hpp | 4 ++--
   branches/release/libs/program_options/test/parsers_test.cpp | 2 +-
   3 files changed, 6 insertions(+), 6 deletions(-)

Modified: branches/release/boost/program_options/detail/parsers.hpp
==============================================================================
--- branches/release/boost/program_options/detail/parsers.hpp (original)
+++ branches/release/boost/program_options/detail/parsers.hpp 2011-01-12 20:46:49 EST (Wed, 12 Jan 2011)
@@ -36,11 +36,11 @@
 
     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 @@
 
     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>,

Modified: branches/release/boost/program_options/parsers.hpp
==============================================================================
--- branches/release/boost/program_options/parsers.hpp (original)
+++ branches/release/boost/program_options/parsers.hpp 2011-01-12 20:46:49 EST (Wed, 12 Jan 2011)
@@ -100,7 +100,7 @@
         /** 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);
@@ -144,7 +144,7 @@
      */
     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>,

Modified: branches/release/libs/program_options/test/parsers_test.cpp
==============================================================================
--- branches/release/libs/program_options/test/parsers_test.cpp (original)
+++ branches/release/libs/program_options/test/parsers_test.cpp 2011-01-12 20:46:49 EST (Wed, 12 Jan 2011)
@@ -131,7 +131,7 @@
     // 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);


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk