Simple-Utility v2.3.1
Loading...
Searching...
No Matches
utility.hpp
Go to the documentation of this file.
1// Copyright Dominic Koepke 2019 - 2023.
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE_1_0.txt or copy at
4// https://www.boost.org/LICENSE_1_0.txt)
5
6#ifndef SL_UTILITY_CONCEPTS_UTILITY_HPP
7#define SL_UTILITY_CONCEPTS_UTILITY_HPP
8
9#pragma once
10
11#include <concepts>
12
13namespace sl::concepts
14{
26 template <class T, class... TArgs>
27 inline constexpr bool are_types_unique_v = (!std::same_as<T, TArgs> && ...) && are_types_unique_v<TArgs...>;
28
33 template <class T>
34 inline constexpr bool are_types_unique_v<T> = true;
35
40 template <class... T>
42
44}
45
46#endif
Checks whether each given type appears only once in the template argument pack.
Definition: utility.hpp:41
constexpr bool are_types_unique_v< T >
Trait overload for single type parameter packs. Returns always true.
Definition: utility.hpp:34
constexpr bool are_types_unique_v
Trait for determining if all types of a parameter pack are unique.
Definition: utility.hpp:27
Definition: operators.hpp:15