diff --git a/include/CLI.hpp b/include/CLI.hpp index 7d0d1792..7f6a4c25 100644 --- a/include/CLI.hpp +++ b/include/CLI.hpp @@ -844,6 +844,18 @@ public: } + template + Option* add_set( + std::string name, ///< The name, short,long + T &member, ///< The selected member of the set + std::set options, ///< The set of posibilities + std::string discription, ///< Discription string + detail::Combiner opts, ///< The options (REQUIRED, DEFAULT, POSITIONAL, ARGS()) + detail::Combiner opts2, + Args... args + ) { + return add_set(name, member, options, discription, opts|opts2, args...); + } //------------ MAKE STYLE ---------// @@ -877,6 +889,17 @@ public: retval->typeval = detail::type_name(); return out; } + + template + Value make_option( + std::string name, ///< The name, short,long + std::string discription, + detail::Combiner opts, + detail::Combiner opts2, + Args... args + ) { + return make_option(name, discription, opts|opts2, args...); + } /// Prototype for new output style with default templatedefaultval = ot.str(); return out; } - + /// Prototype for new output style, vector template::value, detail::enabler> = detail::dummy> @@ -943,6 +966,18 @@ public: return out; } + + template + Value make_option( + std::string name, ///< The name, short,long + const T& default_value, + std::string discription, + detail::Combiner opts, + detail::Combiner opts2, + Args... args + ) { + return make_option(name, default_value, discription, opts|opts2, args...); + } /// Prototype for new output style: flag Value make_flag( @@ -998,7 +1033,18 @@ public: return out; } - + + template + Value make_set( + std::string name, + std::set options, + std::string discription, + detail::Combiner opts, + detail::Combiner opts2, + Args... args + ) { + return make_set(name, options, discription, opts|opts2, args...); + } /// Parses the command line - throws errors void parse(int argc, char **argv) {