stl_algo.h (random_shuffle): Only define for hosted implementations.
authorJonathan Wakely <jwakely@redhat.com>
Tue, 28 Apr 2015 19:42:56 +0000 (20:42 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 28 Apr 2015 19:42:56 +0000 (20:42 +0100)
* include/bits/stl_algo.h (random_shuffle): Only define for hosted
implementations.

From-SVN: r222542

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_algo.h

index 88c0d97e0b4aa4a93407036cefb6ecfa972ed73a..16e43c3fc36392f018edc8f9be161b75fd5f7b33 100644 (file)
@@ -1,3 +1,8 @@
+2015-04-28  Jonathan Wakely  <jwakely@redhat.com>
+
+       * include/bits/stl_algo.h (random_shuffle): Only define for hosted
+       implementations.
+
 2015-04-28  Jonathan Wakely  <jwakely@redhat.com>
 
        * Makefile.am (SUBDIRS): Move python to hosted_source.
index 53c455b16f302d1c39fbe89724dcdc9734e839cb..56cc743ebe797981157f33d4164b257cedb56d9f 100644 (file)
@@ -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