diff options
author | Taylor C. Richberger <Taywee@gmx.com> | 2016-07-11 14:30:37 -0600 |
---|---|---|
committer | Taylor C. Richberger <Taywee@gmx.com> | 2016-07-11 14:30:37 -0600 |
commit | d8645e87109d76b868f0d9b3cba72e2d9392df3a (patch) | |
tree | 8869b1c1cadfd4e402ac730a736c4f917a05f0b4 /README.md | |
parent | switch pages to a submodule (diff) | |
download | args.hxx-d8645e87109d76b868f0d9b3cba72e2d9392df3a.tar.xz |
bump version, change template use6.0.0
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -391,13 +391,15 @@ std::istream& operator>>(std::istream& is, std::tuple<int, int>& ints) #include <args.hxx> -bool DoublesReader(const std::string &name, const std::string &value, std::tuple<double, double> &destination) +struct DoublesReader { - size_t commapos = 0; - std::get<0>(destination) = std::stod(value, &commapos); - std::get<1>(destination) = std::stod(std::string(value, commapos + 1)); - return true; -} + void operator()(const std::string &name, const std::string &value, std::tuple<double, double> &destination) + { + size_t commapos = 0; + std::get<0>(destination) = std::stod(value, &commapos); + std::get<1>(destination) = std::stod(std::string(value, commapos + 1)); + } +}; int main(int argc, char **argv) { |