Commit c641241a87cba7efdcb8f2145649763940784982

Authored by Jarryd Beck
1 parent 4b7fccb5

Fixes to #204.

include/cxxopts.hpp
... ... @@ -975,10 +975,10 @@ namespace cxxopts
975 975 parse_value(const std::string& text, std::vector<T>& value)
976 976 {
977 977 if (text.empty()) {
978   - T v;
979   - parse_value(text, v);
980   - value.emplace_back(std::move(v));
981   - return;
  978 + T v;
  979 + parse_value(text, v);
  980 + value.emplace_back(std::move(v));
  981 + return;
982 982 }
983 983 std::stringstream in(text);
984 984 std::string token;
... ...
test/options.cpp
... ... @@ -244,7 +244,7 @@ TEST_CASE(&quot;Positional with empty arguments&quot;, &quot;[positional]&quot;) {
244 244 Argv av({"foobar", "--long", "long_value", "--", "someProgram", "ab", "-c", "d", "--ef", "gh", "--ijk=lm", "n", "", "o", });
245 245 std::vector<std::string> expected({"ab", "-c", "d", "--ef", "gh", "--ijk=lm", "n", "", "o", });
246 246  
247   - char** argv = av.argv();
  247 + auto** argv = av.argv();
248 248 auto argc = av.argc();
249 249  
250 250 auto result = options.parse(argc, argv);
... ...