mirror of
https://github.com/boostorg/program_options.git
synced 2026-01-26 06:42:26 +00:00
Merge from trunk:
Tolerate argc being zero. Patch from C. K. Jester-Young. [SVN r43331]
This commit is contained in:
@@ -98,10 +98,10 @@ namespace boost { namespace program_options { namespace detail {
|
||||
{
|
||||
#if defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)
|
||||
vector<string> args;
|
||||
copy(argv+1, argv+argc, inserter(args, args.end()));
|
||||
copy(argv+1, argv+argc+!argc, inserter(args, args.end()));
|
||||
init(args);
|
||||
#else
|
||||
init(vector<string>(argv+1, argv+argc));
|
||||
init(vector<string>(argv+1, argv+argc+!argc));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user