aboutsummaryrefslogtreecommitdiff
path: root/args.hxx
diff options
context:
space:
mode:
authorTaylor C. Richberger <Taywee@gmx.com>2016-06-02 17:08:56 -0600
committerTaylor C. Richberger <Taywee@gmx.com>2016-06-02 17:08:56 -0600
commit13e4f40ec3e1535f46c2f3293981042af1e2776f (patch)
treeb6b39df7f8d9926049b3c0fb90ba2541f035ca13 /args.hxx
parentimprove readability by culling explicit matcher construction (diff)
downloadargs.hxx-13e4f40ec3e1535f46c2f3293981042af1e2776f.tar.xz
allow set use4.1.5
Diffstat (limited to 'args.hxx')
-rw-r--r--args.hxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/args.hxx b/args.hxx
index e0d6f54..dcfa235 100644
--- a/args.hxx
+++ b/args.hxx
@@ -1435,8 +1435,9 @@ namespace args
virtual void ParseValue(const std::string &value) override
{
- values.emplace_back();
- Reader(name, value, values.back());
+ T v;
+ Reader(name, value, v);
+ values.insert(std::end(values), v);
}
/** Get the values
@@ -1610,8 +1611,9 @@ namespace args
virtual void ParseValue(const std::string &value) override
{
- values.emplace_back();
- Reader(name, value, values.back());
+ T v;
+ Reader(name, value, v);
+ values.insert(std::end(values), v);
matched = true;
}