[libcxx-commits] [libcxx] [libc++][ranges] Updated `[[nodiscard]]` implementation for `subrange` and `join_with_view` (PR #176936)

Hristo Hristov via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jan 23 22:43:24 PST 2026


================
@@ -372,7 +372,7 @@ struct join_with_view<_View, _Pattern>::__iterator
     return __tmp;
   }
 
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(const __iterator& __x, const __iterator& __y)
+  _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(const __iterator& __x, const __iterator& __y)
----------------
H-G-Hristov wrote:


"I don't think this is written anywhere explicitly, but we decided we won't be annotating cases where the compiler is producing a diagnostic warning—e.g., equality and relational operators. I removed the above annotation for consistency with the rest of the codebase."

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


More information about the libcxx-commits mailing list