[libcxx-commits] [libcxx] WIP [libc++][ranges] Applied [[nodiscard]] to `lazy_split` (PR #208036)
Hristo Hristov via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jul 7 21:01:54 PDT 2026
================
@@ -95,35 +95,35 @@ class lazy_split_view : public view_interface<lazy_split_view<_View, _Pattern>>
_LIBCPP_HIDE_FROM_ABI constexpr explicit lazy_split_view(_Range&& __r, range_value_t<_Range> __e)
: __base_(views::all(std::forward<_Range>(__r))), __pattern_(views::single(std::move(__e))) {}
- _LIBCPP_HIDE_FROM_ABI constexpr _View base() const&
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _View base() const&
requires copy_constructible<_View>
{
return __base_;
}
- _LIBCPP_HIDE_FROM_ABI constexpr _View base() && { return std::move(__base_); }
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _View base() && { return std::move(__base_); }
- _LIBCPP_HIDE_FROM_ABI constexpr auto begin() {
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto begin() {
if constexpr (forward_range<_View>) {
- return __outer_iterator < __simple_view<_View> && __simple_view < _Pattern >> {*this, ranges::begin(__base_)};
----------------
Zingam wrote:
unrelated formatting
https://github.com/llvm/llvm-project/pull/208036
More information about the libcxx-commits
mailing list