|
kaycxx-cli
C++ CLI library
|
Defines value parsing support used by typed options and positional parameters. More...
#include <charconv>#include <concepts>#include <exception>#include <format>#include <string_view>#include <system_error>#include <type_traits>#include <kaycxx/cli/parse_error.hpp>

Go to the source code of this file.
Concepts | |
| concept | kaycxx::cli::from_chars_parseable |
Checks whether a type can be parsed with std::from_chars. | |
| concept | kaycxx::cli::string_view_constructible |
Checks whether a type can be constructed from std::string_view. | |
| concept | kaycxx::cli::from_string_parseable |
Checks whether a type can be parsed with an ADL-discovered from_string function. | |
| concept | kaycxx::cli::parseable_value |
| Checks whether a type can be used as a command line value. | |
Functions | |
| template<parseable_value T> | |
| T | kaycxx::cli::detail::parse_value (std::string_view text) |
| Parses a command line value. | |
Defines value parsing support used by typed options and positional parameters.
| T kaycxx::cli::detail::parse_value | ( | std::string_view | text | ) |
Parses a command line value.
Parsing tries std::from_chars first, then ADL from_string, and finally construction from std::string_view.
| T | Value type to parse. |
| text | Value text to parse. |
| parse_error | When the value is syntactically invalid. |