[libcxx-commits] [libcxx] [libc++] Applied `[[nodiscard]]` to `__bounded_iter` (PR #198489)

Hristo Hristov via libcxx-commits libcxx-commits at lists.llvm.org
Sat May 23 00:04:11 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 {
----------------
Zingam wrote:

Thanks! I don't know how I missed those. Let's finish this PR first: https://github.com/llvm/llvm-project/pull/198492 then any subsequent changes will be shaped after it.

https://github.com/llvm/llvm-project/pull/198489


More information about the libcxx-commits mailing list