diff options
author | swarmer <swarmer@yandex-team.com> | 2024-08-07 00:19:10 +0300 |
---|---|---|
committer | swarmer <swarmer@yandex-team.com> | 2024-08-07 00:32:46 +0300 |
commit | cdaa807d2e96e0b0b8560eddf04d8f31a607c9ff (patch) | |
tree | 78e8c042249c1cd26e13ca6af3db235794494a76 | |
parent | 028ea52d7f2b0a374ac6492537e44576fc26713f (diff) | |
download | ydb-cdaa807d2e96e0b0b8560eddf04d8f31a607c9ff.tar.gz |
check the lifetime bound of the yexception
ef257805d160dd37ba7f8c65d1aad1f4040b223e
-rw-r--r-- | util/generic/yexception.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/util/generic/yexception.h b/util/generic/yexception.h index 526023f542..e6507e563f 100644 --- a/util/generic/yexception.h +++ b/util/generic/yexception.h @@ -56,7 +56,7 @@ namespace NPrivateException { ZeroTerminate(); } - TStringBuf AsStrBuf() const; + TStringBuf AsStrBuf() const Y_LIFETIME_BOUND; private: void ZeroTerminate() noexcept; @@ -67,14 +67,14 @@ namespace NPrivateException { template <class E, class T> static inline std::enable_if_t<std::is_base_of<yexception, std::decay_t<E>>::value, E&&> - operator<<(E&& e, const T& t) { + operator<<(E&& e Y_LIFETIME_BOUND, const T& t) { e.Append(t); return std::forward<E>(e); } template <class T> - static inline T&& operator+(const TSourceLocation& sl, T&& t) { + static inline T&& operator+(const TSourceLocation& sl, T&& t Y_LIFETIME_BOUND) { return std::forward<T>(t << sl << TStringBuf(": ")); } } |