aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/memory/weak_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/weak_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/weak_ptr.h')
-rw-r--r--library/cpp/yt/memory/weak_ptr.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/cpp/yt/memory/weak_ptr.h b/library/cpp/yt/memory/weak_ptr.h
index a5a7f0a525..c647198aaf 100644
--- a/library/cpp/yt/memory/weak_ptr.h
+++ b/library/cpp/yt/memory/weak_ptr.h
@@ -48,7 +48,7 @@ public:
: TWeakPtr(ptr.Get())
{
static_assert(
- std::is_base_of_v<TRefCountedBase, T>,
+ std::derived_from<T, TRefCountedBase>,
"Cast allowed only for types derived from TRefCountedBase");
}
@@ -63,7 +63,7 @@ public:
: TWeakPtr(other.Lock())
{
static_assert(
- std::is_base_of_v<TRefCountedBase, T>,
+ std::derived_from<T, TRefCountedBase>,
"Cast allowed only for types derived from TRefCountedBase");
}
@@ -78,7 +78,7 @@ public:
TWeakPtr(TWeakPtr<U>&& other) noexcept
{
static_assert(
- std::is_base_of_v<TRefCountedBase, T>,
+ std::derived_from<T, TRefCountedBase>,
"Cast allowed only for types derived from TRefCountedBase");
TIntrusivePtr<U> strongOther = other.Lock();
if (strongOther) {