diff options
author | swarmer <swarmer@yandex-team.com> | 2024-07-24 22:39:30 +0300 |
---|---|---|
committer | swarmer <swarmer@yandex-team.com> | 2024-07-24 22:51:20 +0300 |
commit | 81c8d5e42918da4bd9dbdd7b45a8b2471c8d9c84 (patch) | |
tree | 970f97d875bdfbd90d7b61a38740fa4e2a669f44 /util/generic/strbuf.h | |
parent | b935fd3c34569828f2ae73eb31a6ac843e2e3023 (diff) | |
download | ydb-81c8d5e42918da4bd9dbdd7b45a8b2471c8d9c84.tar.gz |
check the lifetime bounds of a TStringBuf constructed from a TString, if TString is a std::string
04931f9cabff5a8b2a55ba25df5e3b546be4b745
Diffstat (limited to 'util/generic/strbuf.h')
-rw-r--r-- | util/generic/strbuf.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/util/generic/strbuf.h b/util/generic/strbuf.h index a7a5eba079..2c06b0ff47 100644 --- a/util/generic/strbuf.h +++ b/util/generic/strbuf.h @@ -124,6 +124,12 @@ public: { } + template <typename T> + inline TBasicStringBuf(const TBasicString<TCharType, T>& str Y_STRING_LIFETIME_BOUND) noexcept + : TStringView(str.data(), str.size()) + { + } + template <typename T, typename A> inline TBasicStringBuf(const std::basic_string<TCharType, T, A>& str Y_LIFETIME_BOUND) noexcept : TStringView(str) |