MCPcopy Create free account
hub / github.com/CLIUtils/CLI11 / generate_description

Method generate_description

include/CLI/ExtraValidators.hpp:546–555  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

544
545 /// Generate description like this: NUMBER [UNIT]
546 template <typename Number> static std::string generate_description(const std::string &name, Options opts) {
547 std::stringstream out;
548 out << detail::type_name<Number>() << ' ';
549 if(opts & UNIT_REQUIRED) {
550 out << name;
551 } else {
552 out << '[' << name << ']';
553 }
554 return out.str();
555 }
556};
557
558inline AsNumberWithUnit::Options operator|(const AsNumberWithUnit::Options &a, const AsNumberWithUnit::Options &b) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected