mirror of
https://github.com/sametersoylu/argument-parser.git
synced 2026-05-28 20:08:10 +00:00
feat: introduce help. auto add help through parser generation like another action.
This commit is contained in:
@@ -77,9 +77,8 @@ namespace argument_parser::v2 {
|
||||
return base::get_optional<T>(arg);
|
||||
}
|
||||
|
||||
void on_complete(std::function<void(argument_parser::base_parser const &)> const &action) {
|
||||
base::on_complete(action);
|
||||
}
|
||||
using argument_parser::base_parser::display_help;
|
||||
using argument_parser::base_parser::on_complete;
|
||||
|
||||
protected:
|
||||
void set_program_name(std::string p) {
|
||||
@@ -90,6 +89,9 @@ namespace argument_parser::v2 {
|
||||
return base::parsed_arguments;
|
||||
}
|
||||
|
||||
using argument_parser::base_parser::current_conventions;
|
||||
using argument_parser::base_parser::reset_current_conventions;
|
||||
|
||||
private:
|
||||
template <bool IsTyped, typename ActionType, typename T, typename ArgsMap>
|
||||
void add_argument_impl(ArgsMap const &argument_pairs) {
|
||||
|
||||
Reference in New Issue
Block a user