![]() |
CPP-ARGON 4.0.1
Command-Line Argument Parser for C++20
|
Helper functions, types, concepts, etc. More...
Concepts | |
| concept | argon::action::util::c_value_action_specifier |
The concept is satisfied when AS is a valid value action action specifier. | |
| concept | argon::action::util::c_flag_action_specifier |
The concept is satisfied when AS is a valid on-flag action action specifier. | |
| concept | argon::action::util::c_action_specifier |
The concept is satisfied when AS is a valid action action specifier. | |
| concept | argon::util::c_is_none |
The concept is satisfied when T is argon::none_type. | |
| concept | argon::util::c_readable |
The concept is satisfied when T overloads the std::istream operator >>. | |
| concept | argon::util::c_trivially_readable |
The concept is satisfied when T can be constructed from const std::string&. | |
| concept | argon::util::c_writable |
The concept is satisfied when T overloads the std::ostream operator <<. | |
| concept | argon::util::c_arithmetic |
The concept is satisfied when T is an arithmetic type. | |
| concept | argon::util::c_argument_value_type |
| The concept is used to verify the validity of the arguments' value types. | |
| concept | argon::util::c_one_of |
Validates that T is the same as one of the types defined by Types. | |
| concept | argon::util::c_valid_type |
Concept that enforces is_valid_type_v. | |
| concept | argon::util::c_range_of |
| Validates that R is a range of type T (ignoring the cvref qualifiers). | |
| concept | argon::util::c_forward_range_of |
| Validates that It is a forward iterator of type T (ignoring the cvref qualifiers). | |
| concept | argon::util::c_forward_iterator_of |
| Validates that It is a forward iterator of type T (ignoring the cvref qualifiers). | |
Classes | |
| struct | argon::action::util::apply_visitor< T > |
| A visitor structure used to apply value actions. More... | |
Typedefs | |
| template<c_value_action_specifier AS, argon::util::c_argument_value_type T> | |
| using | argon::action::util::callable_type = typename AS::template type< T > |
| Template argument action callable type alias. | |
Enumerations | |
| enum class | argon::util::type_validator : bool { argon::util::type_validator::same , argon::util::type_validator::convertible } |
| Specifies the type validation rule. More... | |
Functions | |
| template<typename T > | |
| constexpr auto | argon::util::any_range_cast_view (const c_range_of< std::any > auto &range) |
Casts a range of std::any to a range of type T. | |
| template<c_writable T> | |
| std::string | argon::util::as_string (const T &value) noexcept |
Converts a value to std::string. | |
| template<std::ranges::range R> requires (c_writable<std::ranges::range_value_t<R>>) | |
| std::string | argon::util::join (const R &range, const std::string_view delimiter=", ") |
| Joins elements of a range into a single string with a delimiter. | |
| template<typename T > | |
| constexpr std::string_view | argon::util::get_demangled_type_name () |
Retrieves the demangled name of a type T. | |
Variables | |
| template<typename T , typename U , type_validator TV> | |
| constexpr bool | argon::util::is_valid_type_v = false |
Checks if two types satisfy a given type_validator rule. | |
Helper functions, types, concepts, etc.
| using argon::action::util::callable_type = typedef typename AS::template type<T> |
Template argument action callable type alias.
Definition at line 22 of file helpers.hpp.
|
strong |
Specifies the type validation rule.
| Enumerator | |
|---|---|
| same | Exact type match. |
| convertible | Implicit conversion allowed. |
Definition at line 82 of file concepts.hpp.
|
constexpr |
Casts a range of std::any to a range of type T.
| T | The target type. |
| range | The input range of std::any. |
T. | std::bad_any_cast | if any element in the input range cannot be cast to type T. |
Definition at line 28 of file ranges.hpp.
Converts a value to std::string.
| T | The value type (must satisfy the argon::util::c_writable concept). |
| value | The value to convert. |
Definition at line 27 of file string.hpp.
Retrieves the demangled name of a type T.
| T | The type to retrieve the name for. |
T. Definition at line 29 of file typing.hpp.
| std::string argon::util::join | ( | const R & | range, |
| const std::string_view | delimiter = ", " |
||
| ) |
Joins elements of a range into a single string with a delimiter.
| R | The type of the value range. The value type of R must satisfy the c_writable concept. |
| range | The input range to join. |
| delimiter | The separator string to insert between elements. |
Definition at line 48 of file string.hpp.
Checks if two types satisfy a given type_validator rule.
The primary template of the is_valid_type_v helper variable, which does not perform any logic and defaults to false.
| T | The type to check. |
| U | The type to check agains. |
| TV | The validation rule. |
Definition at line 99 of file concepts.hpp.