Ignore underscore. Subcommands inherit value.
| 5023 | |
| 5024 | /// Ignore underscore. Subcommands inherit value. |
| 5025 | App *ignore_underscore(bool value = true) { |
| 5026 | if (value && !ignore_underscore_) { |
| 5027 | ignore_underscore_ = true; |
| 5028 | auto *p = (parent_ != nullptr) ? _get_fallthrough_parent() : this; |
| 5029 | auto &match = _compare_subcommand_names(*this, *p); |
| 5030 | if (!match.empty()) { |
| 5031 | ignore_underscore_ = false; |
| 5032 | throw OptionAlreadyAdded("ignore underscore would cause subcommand name conflicts: " + match); |
| 5033 | } |
| 5034 | } |
| 5035 | ignore_underscore_ = value; |
| 5036 | return this; |
| 5037 | } |
| 5038 | |
| 5039 | /// Set the help formatter |
| 5040 | App *formatter(std::shared_ptr<FormatterBase> fmt) { |
no test coverage detected