mirror of
https://github.com/jarro2783/cxxopts.git
synced 2026-08-29 01:25:31 +02:00
Fix positional arguments overload
Fixes #83. Adds an overload for positional arguments taking a `std::initializer_list`. When using an `initializer_list` with one argument, the function call is ambiguous matching both `std::string` and `std::vector<std::string>`.
This commit is contained in:
+1
-1
@@ -145,7 +145,7 @@ TEST_CASE("All positional", "[positional]")
|
||||
auto argc = av.argc();
|
||||
auto argv = av.argv();
|
||||
|
||||
options.parse_positional("positional");
|
||||
options.parse_positional({"positional"});
|
||||
|
||||
auto result = options.parse(argc, argv);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user