diff --git a/include/cxxopts.hpp b/include/cxxopts.hpp index 1381ab3..7e86365 100644 --- a/include/cxxopts.hpp +++ b/include/cxxopts.hpp @@ -1220,6 +1220,28 @@ namespace cxxopts std::vector m_sequential; }; + + struct Option + { + Option + ( + const std::string& opts, + const std::string& desc, + const std::shared_ptr& value = ::cxxopts::value(), + const std::string& arg_help = "" + ) + : opts_(opts) + , desc_(desc) + , value_(value) + , arg_help_(arg_help) + { + } + + std::string opts_; + std::string desc_; + std::shared_ptr value_; + std::string arg_help_; + }; class Options { @@ -1272,6 +1294,20 @@ namespace cxxopts OptionAdder add_options(std::string group = ""); + + void + add_options + ( + const std::string& group, + std::initializer_list