From 2e7e2075d1f1b0ac9b962adde9833d2040f513e6 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 28 Apr 2015 20:42:56 +0100 Subject: [PATCH] stl_algo.h (random_shuffle): Only define for hosted implementations. * include/bits/stl_algo.h (random_shuffle): Only define for hosted implementations. From-SVN: r222542 --- libstdc++-v3/ChangeLog | 5 +++++ libstdc++-v3/include/bits/stl_algo.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 88c0d97e0b4..16e43c3fc36 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2015-04-28 Jonathan Wakely + + * include/bits/stl_algo.h (random_shuffle): Only define for hosted + implementations. + 2015-04-28 Jonathan Wakely * Makefile.am (SUBDIRS): Move python to hosted_source. diff --git a/libstdc++-v3/include/bits/stl_algo.h b/libstdc++-v3/include/bits/stl_algo.h index 53c455b16f3..56cc743ebe7 100644 --- a/libstdc++-v3/include/bits/stl_algo.h +++ b/libstdc++-v3/include/bits/stl_algo.h @@ -4420,6 +4420,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO std::__iterator_category(__result)); } +#if _GLIBCXX_HOSTED /** * @brief Randomly shuffle the elements of a sequence. * @ingroup mutating_algorithms @@ -4450,6 +4451,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO std::iter_swap(__i, __j); } } +#endif /** * @brief Shuffle the elements of a sequence using a random number -- 2.30.2