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
..
2020-01-01 12:51:42 +01:00
2020-01-01 12:51:42 +01:00
2020-01-01 12:51:42 +01:00