Merge pull request #44 from morphis/bug/cli-type-reference-no-value

Correctly handle type reference flag values
This commit is contained in:
Simon Fels 2017-02-17 19:47:05 +01:00 committed by GitHub
commit 7e2b0c16df

View file

@ -154,9 +154,7 @@ class TypedReferenceFlag : public Flag {
void specify_option(Flag::Specification& spec) override {
spec = boost::program_options::value<std::string>()->notifier([&](const std::string& s) {
std::stringstream ss{s};
T value;
ss >> value;
value_ = value;
ss >> value_.get();
});
}