get overloads

Synopses

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

Returns the non‐type template argument V, whose type is T

template<
    typename T,
    same_as<T> auto V>
[[nodiscard]]
consteval
auto
get();

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

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

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

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

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

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

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

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

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

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

Return Value

  • The value of V

  • A default‐constructed instance of T1

  • The value of the first argument whose type matches T

  • A default‐constructed instance of the first matching type

Note

The return value should not be discarded.

Template Parameters

Name

Description

T

The type that V must have

V

The non‐type template argument to return

T1

The type to return, required to be a specialization of T

V1

The first non‐type template argument to check

V2

The second non‐type template argument to check

Vs

The remaining non‐type template arguments to check

T2

The second type to check

Ts

The remaining types to check

Created with MrDocs