https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77994
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- Author: redi Date: Mon Oct 17 16:50:37 2016 New Revision: 241249 URL: https://gcc.gnu.org/viewcvs?rev=241249&root=gcc&view=rev Log: Backport fixes to std::experimental::sample PR libstdc++/77994 * include/experimental/algorithm (experimental::sample): Convert size argument to iterator difference type. Fix invalid use of input iterator. Defend against overloaded comma operator. Modified: branches/gcc-6-branch/libstdc++-v3/ChangeLog branches/gcc-6-branch/libstdc++-v3/include/experimental/algorithm branches/gcc-6-branch/libstdc++-v3/testsuite/experimental/algorithm/sample.cc