From: Jonathan Wakely Date: Tue, 28 Apr 2015 19:42:56 +0000 (+0100) Subject: stl_algo.h (random_shuffle): Only define for hosted implementations. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2e7e2075d1f1b0ac9b962adde9833d2040f513e6;p=gcc.git 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 --- 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