[libcxx-commits] [libcxx] [libc++][ranges] Applied [[nodiscard]] to `adjacent_transform_view` (PR #205900)
Lucas Mellone via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jun 30 00:53:00 PDT 2026
================
@@ -105,30 +105,30 @@ class adjacent_transform_view : public view_interface<adjacent_transform_view<_V
_LIBCPP_HIDE_FROM_ABI constexpr explicit adjacent_transform_view(_View __base, _Fn __fun)
: __inner_(std::move(__base)), __fun_(std::in_place, std::move(__fun)) {}
- _LIBCPP_HIDE_FROM_ABI constexpr _View base() const&
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _View base() const&
requires copy_constructible<_View>
{
return __inner_.base();
}
- _LIBCPP_HIDE_FROM_ABI constexpr _View base() && { return std::move(__inner_).base(); }
- _LIBCPP_HIDE_FROM_ABI constexpr auto begin() { return __iterator<false>(*this, __inner_.begin()); }
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _View base() && { return std::move(__inner_).base(); }
----------------
lknknm wrote:
Yes, sorry, I think it has something to do with the formatting I applied. I'll fix that.
https://github.com/llvm/llvm-project/pull/205900
More information about the libcxx-commits
mailing list