[libcxx-commits] [libcxx] [libc++][iterator] Applied `[[nodiscard]]` (PR #172200)

Hristo Hristov via libcxx-commits libcxx-commits at lists.llvm.org
Sun Dec 14 23:16:11 PST 2025


================
@@ -212,11 +216,10 @@ operator<=>(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) noex
 #endif // _LIBCPP_STD_VER >= 20
 
 template <class _Iter1, class _Iter2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
+[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
 #ifndef _LIBCPP_CXX03_LANG
-    auto
-    operator-(const __wrap_iter<_Iter1>& __x,
-              const __wrap_iter<_Iter2>& __y) _NOEXCEPT->decltype(__x.base() - __y.base())
+auto operator-(const __wrap_iter<_Iter1>& __x,
+               const __wrap_iter<_Iter2>& __y) _NOEXCEPT->decltype(__x.base() - __y.base())
----------------
Zingam wrote:

By Code Formatted CI

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


More information about the libcxx-commits mailing list