From b041247bb713e9a223c3448189f0a9ea49c5e8b2 Mon Sep 17 00:00:00 2001 From: "Taylor C. Richberger" Date: Thu, 30 Jun 2016 18:03:08 -0600 Subject: fix readme example --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0ac02e4..2bac1ce 100644 --- a/README.md +++ b/README.md @@ -381,11 +381,12 @@ std::istream& operator>>(std::istream& is, std::tuple& ints) #include -void DoublesReader(const std::string &name, const std::string &value, std::tuple &destination) +bool DoublesReader(const std::string &name, const std::string &value, std::tuple &destination) { 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; } int main(int argc, char **argv) @@ -751,10 +752,11 @@ int main(int argc, char **argv) I haven't written out a long example for this, but here's the test case you should be able to discern the meaning from: ```cpp -void ToLowerReader(const std::string &name, const std::string &value, std::string &destination) +bool ToLowerReader(const std::string &name, const std::string &value, std::string &destination) { destination = value; std::transform(destination.begin(), destination.end(), destination.begin(), ::tolower); + return true; } TEST_CASE("Mapping types work as needed", "[args]") -- cgit v1.2.1