cli11
Loading...
Searching...
No Matches
cli::detail::direct_constructible Concept Referenceexport
module cli11

Matches types brace-constructible from C without narrowing. More...

Concept definition

template<typename T, typename C>
std::is_constructible_v<T, C> && std::is_move_assignable_v<T> && requires { T {std::declval<C>()}; }
Matches types brace-constructible from C without narrowing.
Definition type_tools.cpp:199

Detailed Description

Matches types brace-constructible from C without narrowing.

Brace initialisation is deliberate: it rejects narrowing conversions, so a type taking double is not treated as taking int. Move-assignability is required because the conversion machinery assigns the result.

Template Parameters
TThe type to construct.
CThe type to construct it from.