cmoon::meta::type_list<Types...>::is_all_same_type





[[nodiscard]] static constexpr bool is_all_same_type() noexcept;


(1)

Returns true if all Types... are the same type, returns false otherwise.

Parameters

(none)

Return value

true if all Types... are the same type, false otherwise.

Exceptions

This function never throws exceptions

Complexity

Constant.

Example



import cmoon.meta;

int main()
{
    using tl = cmoon::meta::type_list<int, float, char, int>;
    using tl2 = cmoon::meta::type_list<int, int, int>;

    static_assert(!tl::is_all_same_type());
    static_assert(tl2::is_all_same_type());
}