File indexing completed on 2025-01-18 09:27:55
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010 namespace Acts::detail {
0011
0012 namespace {
0013 template <typename... Args>
0014 struct has_duplicates;
0015
0016 template <>
0017 struct has_duplicates<> {
0018 static constexpr bool value = false;
0019 };
0020
0021 template <typename last>
0022 struct has_duplicates<last> {
0023 static constexpr bool value = false;
0024 };
0025
0026 template <typename first, typename second, typename... others>
0027 struct has_duplicates<first, second, others...> {
0028 private:
0029 static constexpr bool _first = has_duplicates<first, others...>::value;
0030 static constexpr bool _second = has_duplicates<second, others...>::value;
0031
0032 public:
0033 static constexpr bool value = _first || _second;
0034 };
0035
0036 template <typename first, typename... others>
0037 struct has_duplicates<first, first, others...> {
0038 static constexpr bool value = true;
0039 };
0040 }
0041
0042 template <typename... Args>
0043 constexpr bool has_duplicates_v = has_duplicates<Args...>::value;
0044 }