https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112453

            Bug ID: 112453
           Summary: <ranges>: __take_of_repeat_view/__drop_of_repeat_view
                    should forwards __r._M_value
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

The current wording clearly indicates *E.value_ instead of *r.value_.

https://godbolt.org/z/GcnbesbEE

#include <ranges>
#include <memory>

int main() {
  auto t = std::views::repeat(std::make_unique<int>(5), 4) |
std::views::take(2);
  auto d = std::views::repeat(std::make_unique<int>(5), 4) |
std::views::drop(2);
}

Reply via email to