[libcxx-commits] [libcxx] Add lifetimebound to std::basic_string::opeator std::string_view (PR #112614)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Oct 16 13:54:25 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: None (higher-performance)
<details>
<summary>Changes</summary>
This should fix #<!-- -->112234.
---
Full diff: https://github.com/llvm/llvm-project/pull/112614.diff
1 Files Affected:
- (modified) libcxx/include/string (+1-1)
``````````diff
diff --git a/libcxx/include/string b/libcxx/include/string
index e8c9bcee53e3df..f6dd7293de90ca 100644
--- a/libcxx/include/string
+++ b/libcxx/include/string
@@ -1213,7 +1213,7 @@ public:
__alloc_traits::deallocate(__alloc(), __get_long_pointer(), __get_long_cap());
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 operator __self_view() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 operator __self_view() const _NOEXCEPT _LIBCPP_LIFETIMEBOUND {
return __self_view(typename __self_view::__assume_valid(), data(), size());
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/112614
More information about the libcxx-commits
mailing list