aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/store_policy.h
diff options
context:
space:
mode:
authorswarmer <swarmer@yandex-team.com>2024-08-07 00:19:47 +0300
committerswarmer <swarmer@yandex-team.com>2024-08-07 00:42:23 +0300
commit1934894f381e2d6dff72600dfe60173c200f6067 (patch)
tree24cd983a335ea6e4f32274e2eb0c5a303b560894 /util/generic/store_policy.h
parenta9c8987363503f0d434be8b1e7b494be65a2b477 (diff)
downloadydb-1934894f381e2d6dff72600dfe60173c200f6067.tar.gz
check the lifetime bound of the ptr-store-policy
143a81f1f8275b59d4a53b5978ec7777fc2e7b05
Diffstat (limited to 'util/generic/store_policy.h')
-rw-r--r--util/generic/store_policy.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/generic/store_policy.h b/util/generic/store_policy.h
index 497b13f6c4..93608571af 100644
--- a/util/generic/store_policy.h
+++ b/util/generic/store_policy.h
@@ -10,7 +10,7 @@ struct TWithRefCount: public TBase, public TRefCounted<TWithRefCount<TBase, TCou
template <class T>
struct TPtrPolicy {
- inline TPtrPolicy(T* t)
+ inline TPtrPolicy(T* t Y_LIFETIME_BOUND)
: T_(t)
{
}
@@ -93,7 +93,7 @@ template <class T, bool IsReference = std::is_reference<T>::value>
struct TAutoEmbedOrPtrPolicy: TPtrPolicy<std::remove_reference_t<T>> {
using TBase = TPtrPolicy<std::remove_reference_t<T>>;
- TAutoEmbedOrPtrPolicy(T& reference)
+ TAutoEmbedOrPtrPolicy(T& reference Y_LIFETIME_BOUND)
: TBase(&reference)
{
}