diff --git a/include/CLI/App.hpp b/include/CLI/App.hpp index 204283fc..c006fb6c 100644 --- a/include/CLI/App.hpp +++ b/include/CLI/App.hpp @@ -1180,7 +1180,7 @@ class App { /// Check to see if this subcommand was parsed, true only if received on command line. /// This allows the subcommand to be directly checked. - operator bool() const { return parsed_ > 0; } + explicit operator bool() const { return parsed_ > 0; } ///@} /// @name Extras for subclassing diff --git a/include/CLI/Validators.hpp b/include/CLI/Validators.hpp index 4affcdab..2137e952 100644 --- a/include/CLI/Validators.hpp +++ b/include/CLI/Validators.hpp @@ -671,7 +671,7 @@ class IsMember : public Validator { /// This allows in-place construction using an initializer list template - explicit IsMember(std::initializer_list values, Args &&... args) + IsMember(std::initializer_list values, Args &&... args) : IsMember(std::vector(values), std::forward(args)...) {} /// This checks to see if an item is in a set (empty function) @@ -742,7 +742,7 @@ class Transformer : public Validator { /// This allows in-place construction template - explicit Transformer(std::initializer_list> values, Args &&... args) + Transformer(std::initializer_list> values, Args &&... args) : Transformer(TransformPairs(values), std::forward(args)...) {} /// direct map of std::string to std::string @@ -800,7 +800,7 @@ class CheckedTransformer : public Validator { /// This allows in-place construction template - explicit CheckedTransformer(std::initializer_list> values, Args &&... args) + CheckedTransformer(std::initializer_list> values, Args &&... args) : CheckedTransformer(TransformPairs(values), std::forward(args)...) {} /// direct map of std::string to std::string