diff options
author | swarmer <swarmer@yandex-team.com> | 2024-07-27 13:59:12 +0300 |
---|---|---|
committer | swarmer <swarmer@yandex-team.com> | 2024-07-27 14:09:40 +0300 |
commit | d0de29447f964f405d9fc3f37618cf3796724c61 (patch) | |
tree | e95bde7b6c80902d3d0d106633b90f626213c9e6 /util/generic/strbuf.h | |
parent | 25820897807c4bbe6fc46855ef8b7afc18f475df (diff) | |
download | ydb-d0de29447f964f405d9fc3f37618cf3796724c61.tar.gz |
check lifetime bounds of a TStringBuf constructed from pointers
a64e291c4e9927286cc8f84fb9bb6b52d0da1345
Diffstat (limited to 'util/generic/strbuf.h')
-rw-r--r-- | util/generic/strbuf.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/util/generic/strbuf.h b/util/generic/strbuf.h index 2c06b0ff47..fa11e39cf1 100644 --- a/util/generic/strbuf.h +++ b/util/generic/strbuf.h @@ -99,12 +99,12 @@ public: */ constexpr inline TBasicStringBuf(std::nullptr_t begin, size_t size) = delete; - constexpr inline TBasicStringBuf(const TCharType* data, size_t size) noexcept + constexpr inline TBasicStringBuf(const TCharType* data Y_LIFETIME_BOUND, size_t size) noexcept : TStringView(data, size) { } - constexpr TBasicStringBuf(const TCharType* data) noexcept + constexpr TBasicStringBuf(const TCharType* data Y_LIFETIME_BOUND) noexcept /* * WARN: TBase::StrLen properly handles nullptr, * while std::string_view (using std::char_traits) will abort in such case @@ -113,7 +113,7 @@ public: { } - constexpr inline TBasicStringBuf(const TCharType* beg, const TCharType* end) noexcept + constexpr inline TBasicStringBuf(const TCharType* beg Y_LIFETIME_BOUND, const TCharType* end Y_LIFETIME_BOUND) noexcept : TStringView(beg, end - beg) { } |