cmoon::meta::value_list<Values...>::size





template<index_type N>
[[nodiscard]] static constexpr auto get() noexcept;


(1)

Returns the value at index N. This function is ill-formed if N < size().

Parameters

(none)

Return value

The value at index N

Exceptions

This function never throws exceptions

Complexity

Constant.

Example



import cmoon.meta;

int main()
{
    using tl = cmoon::meta::value_list<1, 2, 3, 4>;

    static_assert(tl::get<0>() == 1);
    static_assert(tl::get<1>() == 2);
    static_assert(tl::get<2>() == 3);
    static_assert(tl::get<3>() == 4);
}