From 7dbaa8541362bb2011f766cf16e6d1f0169af375 Mon Sep 17 00:00:00 2001 From: "James E. King III" Date: Sat, 3 Nov 2018 16:06:53 -0400 Subject: [PATCH] Disable random_shuffle test in C++17 mode (it was removed) --- test/stl_concept_covering.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test/stl_concept_covering.cpp b/test/stl_concept_covering.cpp index cc932ec..2202942 100644 --- a/test/stl_concept_covering.cpp +++ b/test/stl_concept_covering.cpp @@ -78,6 +78,17 @@ namespace accum } } +// for std::shuffle +namespace shuffle +{ + struct URBG { + typedef unsigned int result_type; + result_type BOOST_CONSTEXPR static min() { return 0; } + result_type BOOST_CONSTEXPR static max() { return 1; } + result_type operator()() { return 1; } + }; +} + // for std::inner_product namespace inner_prod { @@ -510,6 +521,7 @@ main() output_iterator_archetype out(dummy_cons); out = std::rotate_copy(fi, fi, fi, out); } +#ifndef BOOST_NO_CXX98_RANDOM_SHUFFLE { typedef sgi_assignable_archetype<> T; mutable_random_access_iterator_archetype ri; @@ -521,6 +533,14 @@ main() unary_function_archetype ran(dummy_cons); std::random_shuffle(ri, ri, ran); } +#else + { + typedef sgi_assignable_archetype<> T; + mutable_random_access_iterator_archetype ri; + shuffle::URBG urbg; + std::shuffle(ri, ri, urbg); + } +#endif { typedef null_archetype<> PredArg; typedef sgi_assignable_archetype > FT;