mp_units::get

Returns the first of the non-type template arguments V1, V2, Vs... whose type matches T

Synopsis

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

template<
    typename T,
    auto V1,
    auto V2,
    auto Vs...>
[[nodiscard]]
consteval
auto
get();

Return Value

The value of the first argument whose type matches T

NOTE

The return value should not be discarded.

Template Parameters

NameDescription
TThe type to look for among the types of V1, V2, Vs...
V1The first non-type template argument to check
V2The second non-type template argument to check
VsThe remaining non-type template arguments to check