gcc/libstdc++-v3/testsuite/25_algorithms/sample
Patrick Palka 813ad9c4dd libstdc++: Fix division by zero in std::sample
This fixes a division by zero in the selection-sampling std::__sample
overload when the input range is empty (and hence __unsampled_sz is 0).

libstdc++-v3/ChangeLog:

	* include/bits/stl_algo.h (__sample): Exit early when the
	input range is empty.
	* testsuite/25_algorithms/sample/3.cc: New test.
2020-09-21 20:48:23 -04:00
..
1.cc Update copyright years. 2020-01-01 12:51:42 +01:00
2.cc Update copyright years. 2020-01-01 12:51:42 +01:00
3.cc libstdc++: Fix division by zero in std::sample 2020-09-21 20:48:23 -04:00
81221.cc Update copyright years. 2020-01-01 12:51:42 +01:00
constrained.cc libstdc++: P1243R4 Rangify new algorithms 2020-02-18 11:06:49 -05:00