cli20 0.1.2
A C++20 typed-schema command-line parser
Loading...
Searching...
No Matches
cli::Description Struct Reference

A DescriptionTag field that carries the top-level CLI description. More...

#include <argument.hh>

Inheritance diagram for cli::Description:
cli::DescriptionTag cli::SpecMemberTag

Public Member Functions

constexpr Description ()=default
template<std::size_t N>
constexpr Description (const char(&s)[N])
constexpr Description (std::string_view)=delete
constexpr operator std::string_view () const

Public Attributes

std::string_view text {}

Detailed Description

A DescriptionTag field that carries the top-level CLI description.

Add an instance of Description as a member of your argument specification struct to provide a paragraph that appears in the help output between the usage line and the options/positionals sections:

struct MyArgs {
cli::Description description{"Does something useful."};
cli::Flag<"verbose"> verbose;
};
Arg< Name, ShortName, pack::set_true, nargs::none > Flag
A boolean flag option that stores true when present.
Definition argument.hh:537
A DescriptionTag field that carries the top-level CLI description.
Definition argument.hh:379

Definition at line 379 of file argument.hh.

Constructor & Destructor Documentation

◆ Description() [1/3]

cli::Description::Description ( )
constexprdefault

◆ Description() [2/3]

template<std::size_t N>
cli::Description::Description ( const char(&) s[N])
inlineconstexpr

Definition at line 384 of file argument.hh.

◆ Description() [3/3]

cli::Description::Description ( std::string_view )
constexprdelete

Member Function Documentation

◆ operator std::string_view()

cli::Description::operator std::string_view ( ) const
inlineconstexpr

Definition at line 386 of file argument.hh.

Member Data Documentation

◆ text

std::string_view cli::Description::text {}

Definition at line 380 of file argument.hh.


The documentation for this struct was generated from the following file: