MCPcopy Create free account
hub / github.com/Tencent/TAD_Sim / ignore_case

Method ignore_case

simcore/framework/src/cli/cli.hpp:4991–5003  ·  view source on GitHub ↗

Ignore case. Subcommands inherit value.

Source from the content-addressed store, hash-verified

4989
4990 /// Ignore case. Subcommands inherit value.
4991 App *ignore_case(bool value = true) {
4992 if (value && !ignore_case_) {
4993 ignore_case_ = true;
4994 auto *p = (parent_ != nullptr) ? _get_fallthrough_parent() : this;
4995 auto &match = _compare_subcommand_names(*this, *p);
4996 if (!match.empty()) {
4997 ignore_case_ = false; // we are throwing so need to be exception invariant
4998 throw OptionAlreadyAdded("ignore case would cause subcommand name conflicts: " + match);
4999 }
5000 }
5001 ignore_case_ = value;
5002 return this;
5003 }
5004
5005 /// Allow windows style options, such as `/opt`. First matching short or long name used. Subcommands inherit
5006 /// value.

Callers 1

copy_toMethod · 0.45

Calls 2

OptionAlreadyAddedClass · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected