This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
The __sample algorithms should work with the iterator's difference_type, not the user-supplied _Distance type. PR libstdc++/77994 * include/bits/stl_algo.h (sample): Convert size argument to iterator difference type. * include/experimental/algorithm (experimental::sample): Likewise. * testsuite/25_algorithms/sample/2.cc: New test. Tested powerpc64le-linux, committed to trunk. I'll also fix experimental::sample on gcc-6-branch.
Attachment:
patch.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |