diff --git a/include/cxxopts.hpp b/include/cxxopts.hpp index ed3c6a2..e932547 100644 --- a/include/cxxopts.hpp +++ b/include/cxxopts.hpp @@ -743,6 +743,12 @@ namespace cxxopts void parse_value(const std::string& text, std::vector& value) { + if (text.empty()) { + T v; + parse_value(text, v); + value.emplace_back(std::move(v)); + return; + } std::stringstream in(text); std::string token; while(in.eof() == false && std::getline(in, token, CXXOPTS_VECTOR_DELIMITER)) {