mp_units::get

Returns a default-constructed instance of the first of T1, T2, Ts... that is a specialization of T

Synopsis

Declared in <mp-units/ext/type_traits.h>

template<
    template<auto...> typename T,
    typename T1,
    typename T2,
    typename... Ts>
[[nodiscard]]
consteval
auto
get();

Return Value

A default-constructed instance of the first matching type

NOTE

The return value should not be discarded.

Template Parameters

NameDescription
TThe class template (taking non-type, auto, parameters) to look for
T1The first type to check
T2The second type to check
TsThe remaining types to check