mp_units::contains

Checks whether the type T is present in the type pack T1, Ts...

Synopsis

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

template<
    typename T,
    typename T1,
    typename... Ts>
[[nodiscard]]
consteval
bool
contains();

Return Value

true if T is the same as T1 or one of Ts, false otherwise

NOTE

The return value should not be discarded.

Template Parameters

NameDescription
TThe type to look for
T1The first type of the pack to search
TsThe remaining types of the pack to search