From d3b0b73118dcc7a814ec73f67210cf4164bebb8b Mon Sep 17 00:00:00 2001 From: Dominik Steinberger Date: Wed, 30 Sep 2020 14:57:16 +0200 Subject: [PATCH] Print input when validation fails (#516) Co-authored-by: Dominik Steinberger --- include/CLI/Validators.hpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/CLI/Validators.hpp b/include/CLI/Validators.hpp index bc916f86..4d90896a 100644 --- a/include/CLI/Validators.hpp +++ b/include/CLI/Validators.hpp @@ -746,9 +746,7 @@ class IsMember : public Validator { } // If you reach this point, the result was not found - std::string out(" not in "); - out += detail::generate_set(detail::smart_deref(set)); - return out; + return input + " not in " + detail::generate_set(detail::smart_deref(set)); }; }