https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100795
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2021-05-27 Ever confirmed|0 |1 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- This works though: --- include/bits/ranges_algo.h +++ include/bits/ranges_algo.h @@ -1762,8 +1762,10 @@ // which may take linear time. auto __lasti = ranges::next(__first, __last); return _GLIBCXX_STD_A:: - sample(std::move(__first), std::move(__lasti), std::move(__out), - __n, std::forward<_Gen>(__g)); + __sample(std::move(__first), std::move(__lasti), + forward_iterator_tag{}, + std::move(__out), 0, + __n, std::forward<_Gen>(__g)); } else {