diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-03-13 00:41:06 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2024-03-13 00:50:24 +0300 |
commit | 17bb1bd371ff72b8dff6b22eeed3604fb3d797a9 (patch) | |
tree | 46b4478791e12c980814f681a467be9a5bd34e37 | |
parent | aeb060ae2865e6846f3faa065d5aa3bc21e534d3 (diff) | |
download | ydb-17bb1bd371ff72b8dff6b22eeed3604fb3d797a9.tar.gz |
Intermediate changes
-rw-r--r-- | yt/yt/core/misc/mpl.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/yt/yt/core/misc/mpl.h b/yt/yt/core/misc/mpl.h index be3b00ebbc..fbff7202fb 100644 --- a/yt/yt/core/misc/mpl.h +++ b/yt/yt/core/misc/mpl.h @@ -72,4 +72,24 @@ inline constexpr bool IsSpecialization<T<Args...>, T> = true; //////////////////////////////////////////////////////////////////////////////// +template <class TNeedle, class... THayStack> +concept COneOf = (std::same_as<TNeedle, THayStack> || ...); + +//////////////////////////////////////////////////////////////////////////////// + +namespace NDetail { + +template <typename... Ts> +inline constexpr bool DistinctImpl = true; + +template <typename T, typename... Ts> +inline constexpr bool DistinctImpl<T, Ts...> = DistinctImpl<Ts...> && !COneOf<T, Ts...>; + +} // namespace NDetail + +template <typename... Ts> +concept CDistinct = NDetail::DistinctImpl<Ts...>; + +//////////////////////////////////////////////////////////////////////////////// + } // namespace NYT::NMpl |