16#include <system_error>
21namespace kaycxx::cli {
30 requires std::default_initializable<T>;
31 { std::from_chars(text.data(), text.data() + text.size(), value) } -> std::same_as<std::from_chars_result>;
41 std::constructible_from<T, std::string_view>;
52 { from_string(text, std::type_identity<T>()) } -> std::same_as<T>;
64 std::copy_constructible<T> && (
85template <parseable_value T>
93 if (
result.ec == std::errc::result_out_of_range) {
110 }
catch (std::exception
const&
error) {
Handle for a registered option.
Definition option_handle.hpp:25
Error thrown when command line arguments cannot be parsed.
Definition parse_error.hpp:19
Checks whether a type can be parsed with std::from_chars.
Definition parse_value.hpp:29
Checks whether a type can be parsed with an ADL-discovered from_string function.
Definition parse_value.hpp:51
Checks whether a type can be used as a command line value.
Definition parse_value.hpp:63
Checks whether a type can be constructed from std::string_view.
Definition parse_value.hpp:40
Defines the command line parse error type.
T parse_value(std::string_view text)
Parses a command line value.
Definition parse_value.hpp:86