// 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
#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
__comp);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Checks that a predicate is true for all the elements
* of a sequence.
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
* 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.
*/
return __result;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Determines whether the elements of a sequence are sorted.
* @ingroup sorting_algorithms
}
#endif
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
_GLIBCXX_END_NAMESPACE_VERSION
template<typename _RandomAccessIterator, typename _RandomNumberGenerator>
void
random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_RandomNumberGenerator&& __rand)
#else
_RandomNumberGenerator& __rand)