diff options
author | pogorelov <pogorelov@yandex-team.com> | 2024-07-05 13:55:52 +0300 |
---|---|---|
committer | pogorelov <pogorelov@yandex-team.com> | 2024-07-05 14:11:24 +0300 |
commit | 49dfa72148d692366d88b433ff9cf95596001133 (patch) | |
tree | d2a23ba3e5c6b2ee0cc5f30bef5a5485ec4dd28d /library/cpp/yt/misc/concepts.h | |
parent | b9f0607599b6bd3cd12742bfedfa1028ee27edb5 (diff) | |
download | ydb-49dfa72148d692366d88b433ff9cf95596001133.tar.gz |
Fix issues
089f70efa4e50032e1c73e5c556363fa355eb4dc
Diffstat (limited to 'library/cpp/yt/misc/concepts.h')
-rw-r--r-- | library/cpp/yt/misc/concepts.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/library/cpp/yt/misc/concepts.h b/library/cpp/yt/misc/concepts.h index 5b84bac905..aecad4fe60 100644 --- a/library/cpp/yt/misc/concepts.h +++ b/library/cpp/yt/misc/concepts.h @@ -62,4 +62,23 @@ concept CAnyMap = requires { //////////////////////////////////////////////////////////////////////////////// +template <class T> +concept CConst = std::is_const_v<T>; + +template <class T> +concept CNonConst = !CConst<T>; + +//////////////////////////////////////////////////////////////////////////////// + +template <class T> +concept CRawPtr = std::is_pointer_v<T>; + +template <class T> +concept CConstRawPtr = CRawPtr<T> && CConst<decltype(*std::declval<T>())>; + +template <class T> +concept CMutRawPtr = CRawPtr<T> && !CConstRawPtr<T>; + +//////////////////////////////////////////////////////////////////////////////// + } // namespace NYT |