[libcxx-commits] [libcxx] [libc++] Applied `[[nodiscard]]` to `__bounded_iter` (PR #198489)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Tue May 19 05:46:55 PDT 2026
================
@@ -277,7 +277,7 @@ struct pointer_traits<__bounded_iter<_Iterator> > {
using element_type = typename pointer_traits<_Iterator>::element_type;
using difference_type = typename pointer_traits<_Iterator>::difference_type;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR static element_type* to_address(pointer __it) _NOEXCEPT {
+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR static element_type* to_address(pointer __it) _NOEXCEPT {
----------------
frederick-vs-ja wrote:
`operator+` etc. are not marked `[[__nodicard__]]` yet.
https://github.com/llvm/llvm-project/pull/198489
More information about the libcxx-commits
mailing list