Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / libstdc++-v3 / include / bits / stl_algo.h
index f337e0c..873005b 100644 (file)
@@ -1,8 +1,6 @@
 // Algorithm implementation -*- C++ -*-
 
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-// 2010, 2011
-// Free Software Foundation, Inc.
+// Copyright (C) 2001-2013 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -63,7 +61,7 @@
 #include <bits/stl_heap.h>
 #include <bits/stl_tempbuf.h>  // for _Temporary_buffer
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
 #include <random>     // for std::uniform_int_distribution
 #include <functional> // for std::bind
 #endif
@@ -737,7 +735,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
                             __comp);
     }
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
   /**
    *  @brief  Checks that a predicate is true for all the elements
    *          of a sequence.
@@ -954,7 +952,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       return __result;
     }
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
   /**
    *  @brief Copy the elements of a sequence for which a predicate is true.
    *  @ingroup mutating_algorithms
@@ -1486,7 +1484,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
    *  range @p [__result,__result+(__last-__first)) such that the
    *  order of the elements is reversed.  For every @c i such that @p
    *  0<=i<=(__last-__first), @p reverse_copy() performs the
-   *  assignment @p *(__result+(__last-__first)-i) = *(__first+i).
+   *  assignment @p *(__result+(__last-__first)-1-i) = *(__first+i).
    *  The ranges @p [__first,__last) and @p
    *  [__result,__result+(__last-__first)) must not overlap.
   */
@@ -3964,7 +3962,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       return __result;
     }
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
   /**
    *  @brief  Determines whether the elements of a sequence are sorted.
    *  @ingroup sorting_algorithms
@@ -4413,7 +4411,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     }
 #endif
 
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
 
 _GLIBCXX_END_NAMESPACE_VERSION
 
@@ -5238,7 +5236,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO
   template<typename _RandomAccessIterator, typename _RandomNumberGenerator>
     void
     random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
                   _RandomNumberGenerator&& __rand)
 #else
                   _RandomNumberGenerator& __rand)