File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
include/boost/program_options Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -36,11 +36,11 @@ namespace boost { namespace program_options {
36
36
37
37
template <class charT >
38
38
basic_command_line_parser<charT>::
39
- basic_command_line_parser (int argc, charT* argv[])
39
+ basic_command_line_parser (int argc, const charT* const argv[])
40
40
: detail::cmdline(
41
41
// Explicit template arguments are required by gcc 3.3.1
42
42
// (at least mingw version), and do no harm on other compilers.
43
- to_internal (detail::make_vector<charT, charT**>(argv+1 , argv+argc+!argc)))
43
+ to_internal (detail::make_vector<charT, const charT* const *>(argv+1 , argv+argc+!argc)))
44
44
{}
45
45
46
46
@@ -111,7 +111,7 @@ namespace boost { namespace program_options {
111
111
112
112
template <class charT >
113
113
basic_parsed_options<charT>
114
- parse_command_line (int argc, charT* argv[],
114
+ parse_command_line (int argc, const charT* const argv[],
115
115
const options_description& desc,
116
116
int style,
117
117
function1<std::pair<std::string, std::string>,
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ namespace boost { namespace program_options {
100
100
/* * Creates a command line parser for the specified arguments
101
101
list. The parameters should be the same as passed to 'main'.
102
102
*/
103
- basic_command_line_parser (int argc, charT* argv[]);
103
+ basic_command_line_parser (int argc, const charT* const argv[]);
104
104
105
105
/* * Sets options descriptions to use. */
106
106
basic_command_line_parser& options (const options_description& desc);
@@ -144,7 +144,7 @@ namespace boost { namespace program_options {
144
144
*/
145
145
template <class charT >
146
146
basic_parsed_options<charT>
147
- parse_command_line (int argc, charT* argv[],
147
+ parse_command_line (int argc, const charT* const argv[],
148
148
const options_description&,
149
149
int style = 0 ,
150
150
function1<std::pair<std::string, std::string>,
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ void test_command_line()
131
131
// Regression test: check that '0' as style is interpreted as
132
132
// 'default_style'
133
133
vector<option> a4 =
134
- parse_command_line (sizeof (cmdline3_)/sizeof (const char *), const_cast < char **>( cmdline3_) ,
134
+ parse_command_line (sizeof (cmdline3_)/sizeof (const char *), cmdline3_,
135
135
desc, 0 , additional_parser).options ;
136
136
137
137
BOOST_CHECK_EQUAL (a4.size (), 4u );
You can’t perform that action at this time.
0 commit comments