mp_units::get

Returns a default-constructed instance of T1, given it is a specialization of the class template T

Synopsis

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

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

Return Value

A default-constructed instance of T1

NOTE

The return value should not be discarded.

Template Parameters

NameDescription
TThe class template (taking type parameters) that T1 must specialize
T1The type to return, required to be a specialization of T