diff options
author | arkady-e1ppa <arkady-e1ppa@yandex-team.com> | 2024-05-07 16:44:47 +0300 |
---|---|---|
committer | arkady-e1ppa <arkady-e1ppa@yandex-team.com> | 2024-05-07 16:56:24 +0300 |
commit | 49fa1526961ccacebfd8ef852c8ce4e9444a8624 (patch) | |
tree | 53abefa45a52b7b4ce86543e7ec30b479b29c748 /library/cpp | |
parent | 540569870e417c97d94d61f3ed665b326be87b66 (diff) | |
download | ydb-49fa1526961ccacebfd8ef852c8ce4e9444a8624.tar.gz |
YT-21310: Introduce CYsonStructSource to remove code duplication in TYsonStruct implementation
done
b5dbf4de1df8156e23176662e15b167361fddb19
Diffstat (limited to 'library/cpp')
-rw-r--r-- | library/cpp/yt/misc/concepts.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/library/cpp/yt/misc/concepts.h b/library/cpp/yt/misc/concepts.h index 976c707ffec..5b84bac9059 100644 --- a/library/cpp/yt/misc/concepts.h +++ b/library/cpp/yt/misc/concepts.h @@ -1,6 +1,7 @@ #pragma once #include <concepts> +#include <vector> namespace NYT { @@ -46,4 +47,19 @@ concept CInvocable = NDetail::TIsInvocable<T, TSignature>::Value; //////////////////////////////////////////////////////////////////////////////// +template <class V> +concept CStdVector = requires (V& vec) { + [] <class... T> (std::vector<T...>&) { } (vec); +}; + +//////////////////////////////////////////////////////////////////////////////// + +template <class M> +concept CAnyMap = requires { + typename M::mapped_type; + typename M::key_type; +}; + +//////////////////////////////////////////////////////////////////////////////// + } // namespace NYT |