https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81221
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org Target Milestone|--- |7.2 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- This should fix it: --- a/libstdc++-v3/include/bits/stl_algo.h +++ b/libstdc++-v3/include/bits/stl_algo.h @@ -5831,8 +5831,9 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO "sample size must be an integer type"); typename iterator_traits<_PopulationIterator>::difference_type __d = __n; - return std::__sample(__first, __last, __pop_cat{}, __out, __samp_cat{}, - __d, std::forward<_UniformRandomBitGenerator>(__g)); + return _GLIBCXX_STD_A:: + __sample(__first, __last, __pop_cat{}, __out, __samp_cat{}, __d, + std::forward<_UniformRandomBitGenerator>(__g)); } #endif // C++17 #endif // C++14