aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/memory/intrusive_ptr.h
diff options
context:
space:
mode:
authorAlexSm <alex@ydb.tech>2024-01-18 11:28:56 +0100
committerGitHub <noreply@github.com>2024-01-18 11:28:56 +0100
commit9d0a3761b3201e0d9db879a7adf91876ebdb0564 (patch)
tree541d11ac878c18efd7ebca81e35112aa0fef995b /library/cpp/yt/memory/intrusive_ptr.h
parent404ef8886ecc9736bc58ade6da2fbd83b486a408 (diff)
downloadydb-9d0a3761b3201e0d9db879a7adf91876ebdb0564.tar.gz
Library import 8 (#1074)
* Library import 8 * Add contrib/libs/cxxsupp/libcxx/include/__verbose_abort
Diffstat (limited to 'library/cpp/yt/memory/intrusive_ptr.h')
-rw-r--r--library/cpp/yt/memory/intrusive_ptr.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/library/cpp/yt/memory/intrusive_ptr.h b/library/cpp/yt/memory/intrusive_ptr.h
index 1da3b06966..91b15279ae 100644
--- a/library/cpp/yt/memory/intrusive_ptr.h
+++ b/library/cpp/yt/memory/intrusive_ptr.h
@@ -55,7 +55,7 @@ public:
: T_(other.Get())
{
static_assert(
- std::is_base_of_v<TRefCountedBase, T>,
+ std::derived_from<T, TRefCountedBase>,
"Cast allowed only for types derived from TRefCountedBase");
if (T_) {
Ref(T_);
@@ -75,7 +75,7 @@ public:
: T_(other.Get())
{
static_assert(
- std::is_base_of_v<TRefCountedBase, T>,
+ std::derived_from<T, TRefCountedBase>,
"Cast allowed only for types derived from TRefCountedBase");
other.T_ = nullptr;
}
@@ -103,7 +103,7 @@ public:
std::is_convertible_v<U*, T*>,
"U* must be convertible to T*");
static_assert(
- std::is_base_of_v<TRefCountedBase, T>,
+ std::derived_from<T, TRefCountedBase>,
"Cast allowed only for types derived from TRefCountedBase");
TIntrusivePtr(other).Swap(*this);
return *this;
@@ -124,7 +124,7 @@ public:
std::is_convertible_v<U*, T*>,
"U* must be convertible to T*");
static_assert(
- std::is_base_of_v<TRefCountedBase, T>,
+ std::derived_from<T, TRefCountedBase>,
"Cast allowed only for types derived from TRefCountedBase");
TIntrusivePtr(std::move(other)).Swap(*this);
return *this;