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





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


(1)

Returns true if all of Types... are not the same, returns false otherwise. Always true if sizeof...(Types) is 0.

Parameters

(none)

Return value

true if all of Types... are not the same, 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<float, double>;

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