This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug libstdc++/77994] std::sample uses incorrect integer types internally


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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Mon Oct 17 14:39:23 2016
New Revision: 241245

URL: https://gcc.gnu.org/viewcvs?rev=241245&root=gcc&view=rev
Log:
PR77994 Convert std::sample size argument to suitable 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.

Added:
    trunk/libstdc++-v3/testsuite/25_algorithms/sample/2.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/bits/stl_algo.h
    trunk/libstdc++-v3/include/experimental/algorithm

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]