[libcxx-commits] [libcxx] [libc++] Added `[[nodiscard]]` to `fstream.native_handle`, `span.at` and `in/out_ptr` (PR #167097)
Hristo Hristov via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Nov 8 08:46:10 PST 2025
================
@@ -71,9 +71,11 @@ class out_ptr_t {
}
}
- _LIBCPP_HIDE_FROM_ABI operator _Pointer*() const noexcept { return std::addressof(const_cast<_Pointer&>(__p_)); }
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI operator _Pointer*() const noexcept {
+ return std::addressof(const_cast<_Pointer&>(__p_));
+ }
- _LIBCPP_HIDE_FROM_ABI operator void**() const noexcept
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI operator void**() const noexcept
----------------
H-G-Hristov wrote:
Thank you! Done!
https://github.com/llvm/llvm-project/pull/167097
More information about the libcxx-commits
mailing list