From cc7599360133e07458aa7e07562ade5b8c419d8c Mon Sep 17 00:00:00 2001 From: Bryce Mecum Date: Tue, 23 Aug 2022 05:19:41 -0800 Subject: [PATCH] MINOR: [C++] Replace std::random_shuffle with std::shuffle (#13948) `std::random_shuffle` was deprecated in C++14 and removed altogether in C++17 in favor of `std::shuffle`. The codebase only uses these shuffling functions in tests and benchmarks and `std::shuffle` is used in all instances except this one. Authored-by: Bryce Mecum Signed-off-by: Antoine Pitrou --- cpp/src/arrow/adapters/orc/adapter_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/arrow/adapters/orc/adapter_test.cc b/cpp/src/arrow/adapters/orc/adapter_test.cc index 6914d6b9c1861..1efc02bc404db 100644 --- a/cpp/src/arrow/adapters/orc/adapter_test.cc +++ b/cpp/src/arrow/adapters/orc/adapter_test.cc @@ -173,7 +173,7 @@ void RandWeakComposition(int64_t n, T sum, std::vector* out) { return static_cast(res); }); (*out)[n - 1] += remaining_sum; - std::random_shuffle(out->begin(), out->end()); + std::shuffle(out->begin(), out->end(), gen); } std::shared_ptr GenerateRandomChunkedArray(