arg_router  1.4.0
C++ command line argument parsing and routing
arg_router::policy::description_t< S > Class Template Reference

#include <arg_router/policy/description.hpp>

Public Types

using string_type = S
 

Public Member Functions

constexpr description_t ([[maybe_unused]] S str={}) noexcept
 

Static Public Member Functions

constexpr static std::string_view description () noexcept
 

Detailed Description

template<typename S>
class arg_router::policy::description_t< S >

Represents the description of a node.

If using C++17 then use the template variable helper with the S_ macro; for C++20 and higher, use the constructor directly with a compile-time string literal:

constexpr auto a = ar::policy::description<S_("hello")>;
constexpr auto b = ar::policy::description_t{"hello"_S};
#define S_(tok)
Note
Descriptions must not be empty
Template Parameters
SCompile-time string

Definition at line 23 of file description.hpp.

Member Typedef Documentation

◆ string_type

template<typename S >
using arg_router::policy::description_t< S >::string_type = S

String type.

Definition at line 27 of file description.hpp.

Constructor & Destructor Documentation

◆ description_t()

template<typename S >
constexpr arg_router::policy::description_t< S >::description_t ( [[maybe_unused] ] S  str = {})
inlineexplicitconstexprnoexcept

Constructor.

Parameters
strString instance

Definition at line 33 of file description.hpp.

Member Function Documentation

◆ description()

template<typename S >
constexpr static std::string_view arg_router::policy::description_t< S >::description ( )
inlinestaticconstexprnoexcept

Returns the description.

Returns
Description

Definition at line 39 of file description.hpp.


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