Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#4963 closed Feature Requests (duplicate)

program_options :: command_line_parser :: command_line_parser doesn't accept const char * argv []

Reported by: pal666@… Owned by: Vladimir Prus
Milestone: To Be Determined Component: program_options
Version: Boost 1.45.0 Severity: Cosmetic
Keywords: Cc:

Description

i prefer to declare argv as pointers to const char please add another overload

Change History (3)

comment:1 by pal666@…, 12 years ago

Component: Noneprogram_options
Owner: set to Vladimir Prus
Severity: ProblemCosmetic
Type: BugsFeature Requests

comment:2 by Vladimir Prus, 12 years ago

Resolution: duplicate
Status: newclosed

Thank you for the port.

This seems to be duplicate of #3909, which is fixed as of now.

Please be advised that declaring argv as const is in violation of the C++ Standard.

comment:3 by Serge Pavlovsky <pal666@…>, 12 years ago

according to n3000 it's implementation-defined:

It shall have a return type of type int, but otherwise its type is implementation-defined. All implementations shall allow both of the following definitions of main:

int main() { /* ... */ }

and

int main(int argc, char* argv[]) { /* ... */ }
Note: See TracTickets for help on using tickets.