kaycxx-cli
C++ CLI library
Loading...
Searching...
No Matches
kaycxx::cli::from_string_parseable Concept Reference

Checks whether a type can be parsed with an ADL-discovered from_string function. More...

#include <kaycxx/cli/parse_value.hpp>

Concept definition

template<typename T>
concept kaycxx::cli::from_string_parseable = requires(std::string_view text) {
{ from_string(text, std::type_identity<T>()) } -> std::same_as<T>;
}
Checks whether a type can be parsed with an ADL-discovered from_string function.
Definition parse_value.hpp:51

Detailed Description

Checks whether a type can be parsed with an ADL-discovered from_string function.

Supported functions must live in the same namespace as the parsed type and use the signature T from_string(std::string_view, std::type_identity<T>).

Template Parameters
TValue type to check.