From abab8ce32575d644f929fc57ad9887f8a877b511 Mon Sep 17 00:00:00 2001 From: Jarryd Beck Date: Tue, 5 Jul 2016 08:29:20 +1000 Subject: [PATCH] I27 vector doesn't parse Reorder the `parse_value` functions so that the vector-specific function can see all of the other specific parsers. --- src/cxxopts.hpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/cxxopts.hpp b/src/cxxopts.hpp index 240c4cc..edc53a7 100644 --- a/src/cxxopts.hpp +++ b/src/cxxopts.hpp @@ -401,15 +401,6 @@ namespace cxxopts } } - template - void - parse_value(const std::string& text, std::vector& value) - { - T v; - parse_value(text, v); - value.push_back(v); - } - inline void parse_value(const std::string& /*text*/, bool& value) @@ -426,6 +417,15 @@ namespace cxxopts value = text; } + template + void + parse_value(const std::string& text, std::vector& value) + { + T v; + parse_value(text, v); + value.push_back(v); + } + template struct value_has_arg {