Commit ec494945 by François Dumont

2015-11-09 François Dumont <fdumont@gcc.gnu.org>

	* include/bits/stl_algo.h
	(partial_sort_copy): Instantiate std::iterator_traits only if concept
	checks.
	(lower_bound): Likewise.
	(upper_bound): Likewise.
	(equal_range): Likewise.
	(binary_search): Likewise.
	* include/bits/stl_heap.h (pop_heap): Likewise.

From-SVN: r230052
parent 639fa8a3
2015-11-09 François Dumont <fdumont@gcc.gnu.org>
* include/bits/stl_algo.h
(partial_sort_copy): Instantiate std::iterator_traits only if concept
checks.
(lower_bound): Likewise.
(upper_bound): Likewise.
(equal_range): Likewise.
(binary_search): Likewise.
* include/bits/stl_heap.h (pop_heap): Likewise.
2015-11-06 Kai Tietz <ktietz70@googlemail.com> 2015-11-06 Kai Tietz <ktietz70@googlemail.com>
* testsuite/26_numerics/complex/requirements/constexpr.cc * testsuite/26_numerics/complex/requirements/constexpr.cc
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
#ifndef _STL_ALGO_H #ifndef _STL_ALGO_H
#define _STL_ALGO_H 1 #define _STL_ALGO_H 1
#include <cstdlib> // for rand #include <cstdlib> // for rand
#include <bits/algorithmfwd.h> #include <bits/algorithmfwd.h>
#include <bits/stl_heap.h> #include <bits/stl_heap.h>
#include <bits/stl_tempbuf.h> // for _Temporary_buffer #include <bits/stl_tempbuf.h> // for _Temporary_buffer
...@@ -306,7 +306,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -306,7 +306,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
while (__unary_pred(--__backTrack)) while (__unary_pred(--__backTrack))
{ {
if (--__remainder == 0) if (--__remainder == 0)
return (__first - __count); // Success return (__first - __count); // Success
} }
__remainder = __count + 1 - (__first - __backTrack); __remainder = __count + 1 - (__first - __backTrack);
} }
...@@ -314,7 +314,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -314,7 +314,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
} }
template<typename _ForwardIterator, typename _Integer, template<typename _ForwardIterator, typename _Integer,
typename _UnaryPredicate> typename _UnaryPredicate>
_ForwardIterator _ForwardIterator
__search_n(_ForwardIterator __first, _ForwardIterator __last, __search_n(_ForwardIterator __first, _ForwardIterator __last,
_Integer __count, _Integer __count,
...@@ -859,15 +859,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -859,15 +859,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ {
__first = std::__find_if(__first, __last, __pred); __first = std::__find_if(__first, __last, __pred);
if (__first == __last) if (__first == __last)
return __first; return __first;
_ForwardIterator __result = __first; _ForwardIterator __result = __first;
++__first; ++__first;
for (; __first != __last; ++__first) for (; __first != __last; ++__first)
if (!__pred(__first)) if (!__pred(__first))
{ {
*__result = _GLIBCXX_MOVE(*__first); *__result = _GLIBCXX_MOVE(*__first);
++__result; ++__result;
} }
return __result; return __result;
} }
...@@ -1020,7 +1020,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1020,7 +1020,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _ForwardIterator, typename _BinaryPredicate> template<typename _ForwardIterator, typename _BinaryPredicate>
inline _ForwardIterator inline _ForwardIterator
unique(_ForwardIterator __first, _ForwardIterator __last, unique(_ForwardIterator __first, _ForwardIterator __last,
_BinaryPredicate __binary_pred) _BinaryPredicate __binary_pred)
{ {
// concept requirements // concept requirements
__glibcxx_function_requires(_Mutable_ForwardIteratorConcept< __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
...@@ -1466,7 +1466,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1466,7 +1466,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _ForwardIterator, typename _OutputIterator> template<typename _ForwardIterator, typename _OutputIterator>
inline _OutputIterator inline _OutputIterator
rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, rotate_copy(_ForwardIterator __first, _ForwardIterator __middle,
_ForwardIterator __last, _OutputIterator __result) _ForwardIterator __last, _OutputIterator __result)
{ {
// concept requirements // concept requirements
__glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>) __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
...@@ -1476,7 +1476,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1476,7 +1476,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__glibcxx_requires_valid_range(__middle, __last); __glibcxx_requires_valid_range(__middle, __last);
return std::copy(__first, __middle, return std::copy(__first, __middle,
std::copy(__middle, __last, __result)); std::copy(__middle, __last, __result));
} }
/// This is a helper function... /// This is a helper function...
...@@ -1735,19 +1735,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1735,19 +1735,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_RandomAccessIterator __result_first, _RandomAccessIterator __result_first,
_RandomAccessIterator __result_last) _RandomAccessIterator __result_last)
{ {
#ifdef _GLIBCXX_CONCEPT_CHECKS
typedef typename iterator_traits<_InputIterator>::value_type typedef typename iterator_traits<_InputIterator>::value_type
_InputValueType; _InputValueType;
typedef typename iterator_traits<_RandomAccessIterator>::value_type typedef typename iterator_traits<_RandomAccessIterator>::value_type
_OutputValueType; _OutputValueType;
typedef typename iterator_traits<_RandomAccessIterator>::difference_type #endif
_DistanceType;
// concept requirements // concept requirements
__glibcxx_function_requires(_InputIteratorConcept<_InputIterator>) __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
__glibcxx_function_requires(_ConvertibleConcept<_InputValueType, __glibcxx_function_requires(_ConvertibleConcept<_InputValueType,
_OutputValueType>) _OutputValueType>)
__glibcxx_function_requires(_LessThanOpConcept<_InputValueType, __glibcxx_function_requires(_LessThanOpConcept<_InputValueType,
_OutputValueType>) _OutputValueType>)
__glibcxx_function_requires(_LessThanComparableConcept<_OutputValueType>) __glibcxx_function_requires(_LessThanComparableConcept<_OutputValueType>)
__glibcxx_requires_valid_range(__first, __last); __glibcxx_requires_valid_range(__first, __last);
__glibcxx_requires_irreflexive(__first, __last); __glibcxx_requires_irreflexive(__first, __last);
...@@ -1786,12 +1786,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1786,12 +1786,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_RandomAccessIterator __result_last, _RandomAccessIterator __result_last,
_Compare __comp) _Compare __comp)
{ {
#ifdef _GLIBCXX_CONCEPT_CHECKS
typedef typename iterator_traits<_InputIterator>::value_type typedef typename iterator_traits<_InputIterator>::value_type
_InputValueType; _InputValueType;
typedef typename iterator_traits<_RandomAccessIterator>::value_type typedef typename iterator_traits<_RandomAccessIterator>::value_type
_OutputValueType; _OutputValueType;
typedef typename iterator_traits<_RandomAccessIterator>::difference_type #endif
_DistanceType;
// concept requirements // concept requirements
__glibcxx_function_requires(_InputIteratorConcept<_InputIterator>) __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
...@@ -2020,13 +2020,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -2020,13 +2020,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
lower_bound(_ForwardIterator __first, _ForwardIterator __last, lower_bound(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __val, _Compare __comp) const _Tp& __val, _Compare __comp)
{ {
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
// concept requirements // concept requirements
__glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>) __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
__glibcxx_function_requires(_BinaryPredicateConcept<_Compare, __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
_ValueType, _Tp>) typename iterator_traits<_ForwardIterator>::value_type, _Tp>)
__glibcxx_requires_partitioned_lower_pred(__first, __last, __glibcxx_requires_partitioned_lower_pred(__first, __last,
__val, __comp); __val, __comp);
__glibcxx_requires_irreflexive_pred2(__first, __last, __comp); __glibcxx_requires_irreflexive_pred2(__first, __last, __comp);
...@@ -2078,12 +2075,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -2078,12 +2075,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
upper_bound(_ForwardIterator __first, _ForwardIterator __last, upper_bound(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __val) const _Tp& __val)
{ {
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
// concept requirements // concept requirements
__glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>) __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
__glibcxx_function_requires(_LessThanOpConcept<_Tp, _ValueType>) __glibcxx_function_requires(_LessThanOpConcept<
_Tp, typename iterator_traits<_ForwardIterator>::value_type>)
__glibcxx_requires_partitioned_upper(__first, __last, __val); __glibcxx_requires_partitioned_upper(__first, __last, __val);
__glibcxx_requires_irreflexive2(__first, __last); __glibcxx_requires_irreflexive2(__first, __last);
...@@ -2111,13 +2106,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -2111,13 +2106,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
upper_bound(_ForwardIterator __first, _ForwardIterator __last, upper_bound(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __val, _Compare __comp) const _Tp& __val, _Compare __comp)
{ {
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
// concept requirements // concept requirements
__glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>) __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
__glibcxx_function_requires(_BinaryPredicateConcept<_Compare, __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
_Tp, _ValueType>) _Tp, typename iterator_traits<_ForwardIterator>::value_type>)
__glibcxx_requires_partitioned_upper_pred(__first, __last, __glibcxx_requires_partitioned_upper_pred(__first, __last,
__val, __comp); __val, __comp);
__glibcxx_requires_irreflexive_pred2(__first, __last, __comp); __glibcxx_requires_irreflexive_pred2(__first, __last, __comp);
...@@ -2186,13 +2178,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -2186,13 +2178,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
equal_range(_ForwardIterator __first, _ForwardIterator __last, equal_range(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __val) const _Tp& __val)
{ {
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
// concept requirements // concept requirements
__glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>) __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
__glibcxx_function_requires(_LessThanOpConcept<_ValueType, _Tp>) __glibcxx_function_requires(_LessThanOpConcept<
__glibcxx_function_requires(_LessThanOpConcept<_Tp, _ValueType>) typename iterator_traits<_ForwardIterator>::value_type, _Tp>)
__glibcxx_function_requires(_LessThanOpConcept<
_Tp, typename iterator_traits<_ForwardIterator>::value_type>)
__glibcxx_requires_partitioned_lower(__first, __last, __val); __glibcxx_requires_partitioned_lower(__first, __last, __val);
__glibcxx_requires_partitioned_upper(__first, __last, __val); __glibcxx_requires_partitioned_upper(__first, __last, __val);
__glibcxx_requires_irreflexive2(__first, __last); __glibcxx_requires_irreflexive2(__first, __last);
...@@ -2224,15 +2215,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -2224,15 +2215,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
equal_range(_ForwardIterator __first, _ForwardIterator __last, equal_range(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __val, _Compare __comp) const _Tp& __val, _Compare __comp)
{ {
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
// concept requirements // concept requirements
__glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>) __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
__glibcxx_function_requires(_BinaryPredicateConcept<_Compare, __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
_ValueType, _Tp>) typename iterator_traits<_ForwardIterator>::value_type, _Tp>)
__glibcxx_function_requires(_BinaryPredicateConcept<_Compare, __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
_Tp, _ValueType>) _Tp, typename iterator_traits<_ForwardIterator>::value_type>)
__glibcxx_requires_partitioned_lower_pred(__first, __last, __glibcxx_requires_partitioned_lower_pred(__first, __last,
__val, __comp); __val, __comp);
__glibcxx_requires_partitioned_upper_pred(__first, __last, __glibcxx_requires_partitioned_upper_pred(__first, __last,
...@@ -2259,14 +2247,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -2259,14 +2247,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _ForwardIterator, typename _Tp> template<typename _ForwardIterator, typename _Tp>
bool bool
binary_search(_ForwardIterator __first, _ForwardIterator __last, binary_search(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __val) const _Tp& __val)
{ {
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
// concept requirements // concept requirements
__glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>) __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
__glibcxx_function_requires(_LessThanOpConcept<_Tp, _ValueType>) __glibcxx_function_requires(_LessThanOpConcept<
_Tp, typename iterator_traits<_ForwardIterator>::value_type>)
__glibcxx_requires_partitioned_lower(__first, __last, __val); __glibcxx_requires_partitioned_lower(__first, __last, __val);
__glibcxx_requires_partitioned_upper(__first, __last, __val); __glibcxx_requires_partitioned_upper(__first, __last, __val);
__glibcxx_requires_irreflexive2(__first, __last); __glibcxx_requires_irreflexive2(__first, __last);
...@@ -2295,15 +2281,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -2295,15 +2281,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _ForwardIterator, typename _Tp, typename _Compare> template<typename _ForwardIterator, typename _Tp, typename _Compare>
bool bool
binary_search(_ForwardIterator __first, _ForwardIterator __last, binary_search(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __val, _Compare __comp) const _Tp& __val, _Compare __comp)
{ {
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
// concept requirements // concept requirements
__glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>) __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
__glibcxx_function_requires(_BinaryPredicateConcept<_Compare, __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
_Tp, _ValueType>) _Tp, typename iterator_traits<_ForwardIterator>::value_type>)
__glibcxx_requires_partitioned_lower_pred(__first, __last, __glibcxx_requires_partitioned_lower_pred(__first, __last,
__val, __comp); __val, __comp);
__glibcxx_requires_partitioned_upper_pred(__first, __last, __glibcxx_requires_partitioned_upper_pred(__first, __last,
...@@ -2434,7 +2417,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -2434,7 +2417,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
typename _Pointer, typename _Compare> typename _Pointer, typename _Compare>
void void
__merge_adaptive(_BidirectionalIterator __first, __merge_adaptive(_BidirectionalIterator __first,
_BidirectionalIterator __middle, _BidirectionalIterator __middle,
_BidirectionalIterator __last, _BidirectionalIterator __last,
_Distance __len1, _Distance __len2, _Distance __len1, _Distance __len2,
_Pointer __buffer, _Distance __buffer_size, _Pointer __buffer, _Distance __buffer_size,
...@@ -2495,7 +2478,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -2495,7 +2478,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
typename _Compare> typename _Compare>
void void
__merge_without_buffer(_BidirectionalIterator __first, __merge_without_buffer(_BidirectionalIterator __first,
_BidirectionalIterator __middle, _BidirectionalIterator __middle,
_BidirectionalIterator __last, _BidirectionalIterator __last,
_Distance __len1, _Distance __len2, _Distance __len1, _Distance __len2,
_Compare __comp) _Compare __comp)
...@@ -2550,9 +2533,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -2550,9 +2533,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_Compare __comp) _Compare __comp)
{ {
typedef typename iterator_traits<_BidirectionalIterator>::value_type typedef typename iterator_traits<_BidirectionalIterator>::value_type
_ValueType; _ValueType;
typedef typename iterator_traits<_BidirectionalIterator>::difference_type typedef typename iterator_traits<_BidirectionalIterator>::difference_type
_DistanceType; _DistanceType;
if (__first == __middle || __middle == __last) if (__first == __middle || __middle == __last)
return; return;
...@@ -2725,7 +2708,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -2725,7 +2708,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
void void
__merge_sort_with_buffer(_RandomAccessIterator __first, __merge_sort_with_buffer(_RandomAccessIterator __first,
_RandomAccessIterator __last, _RandomAccessIterator __last,
_Pointer __buffer, _Compare __comp) _Pointer __buffer, _Compare __comp)
{ {
typedef typename iterator_traits<_RandomAccessIterator>::difference_type typedef typename iterator_traits<_RandomAccessIterator>::difference_type
_Distance; _Distance;
...@@ -2752,8 +2735,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -2752,8 +2735,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
void void
__stable_sort_adaptive(_RandomAccessIterator __first, __stable_sort_adaptive(_RandomAccessIterator __first,
_RandomAccessIterator __last, _RandomAccessIterator __last,
_Pointer __buffer, _Distance __buffer_size, _Pointer __buffer, _Distance __buffer_size,
_Compare __comp) _Compare __comp)
{ {
const _Distance __len = (__last - __first + 1) / 2; const _Distance __len = (__last - __first + 1) / 2;
const _RandomAccessIterator __middle = __first + __len; const _RandomAccessIterator __middle = __first + __len;
...@@ -3326,7 +3309,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -3326,7 +3309,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__glibcxx_function_requires(_LessThanComparableConcept<_Tp>) __glibcxx_function_requires(_LessThanComparableConcept<_Tp>)
return __b < __a ? pair<const _Tp&, const _Tp&>(__b, __a) return __b < __a ? pair<const _Tp&, const _Tp&>(__b, __a)
: pair<const _Tp&, const _Tp&>(__a, __b); : pair<const _Tp&, const _Tp&>(__a, __b);
} }
/** /**
...@@ -3344,7 +3327,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -3344,7 +3327,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
minmax(const _Tp& __a, const _Tp& __b, _Compare __comp) minmax(const _Tp& __a, const _Tp& __b, _Compare __comp)
{ {
return __comp(__b, __a) ? pair<const _Tp&, const _Tp&>(__b, __a) return __comp(__b, __a) ? pair<const _Tp&, const _Tp&>(__b, __a)
: pair<const _Tp&, const _Tp&>(__a, __b); : pair<const _Tp&, const _Tp&>(__a, __b);
} }
template<typename _ForwardIterator, typename _Compare> template<typename _ForwardIterator, typename _Compare>
...@@ -4151,7 +4134,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO ...@@ -4151,7 +4134,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO
* consecutive elements for which the predicate returns true. * consecutive elements for which the predicate returns true.
*/ */
template<typename _ForwardIterator, typename _Integer, typename _Tp, template<typename _ForwardIterator, typename _Integer, typename _Tp,
typename _BinaryPredicate> typename _BinaryPredicate>
inline _ForwardIterator inline _ForwardIterator
search_n(_ForwardIterator __first, _ForwardIterator __last, search_n(_ForwardIterator __first, _ForwardIterator __last,
_Integer __count, const _Tp& __val, _Integer __count, const _Tp& __val,
...@@ -4193,8 +4176,8 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO ...@@ -4193,8 +4176,8 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO
// concept requirements // concept requirements
__glibcxx_function_requires(_InputIteratorConcept<_InputIterator>) __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
__glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
// "the type returned by a _UnaryOperation" // "the type returned by a _UnaryOperation"
__typeof__(__unary_op(*__first))>) __typeof__(__unary_op(*__first))>)
__glibcxx_requires_valid_range(__first, __last); __glibcxx_requires_valid_range(__first, __last);
for (; __first != __last; ++__first, (void)++__result) for (; __first != __last; ++__first, (void)++__result)
...@@ -4232,8 +4215,8 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO ...@@ -4232,8 +4215,8 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO
__glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>) __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
__glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>) __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
__glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
// "the type returned by a _BinaryOperation" // "the type returned by a _BinaryOperation"
__typeof__(__binary_op(*__first1,*__first2))>) __typeof__(__binary_op(*__first1,*__first2))>)
__glibcxx_requires_valid_range(__first1, __last1); __glibcxx_requires_valid_range(__first1, __last1);
for (; __first1 != __last1; ++__first1, (void)++__first2, ++__result) for (; __first1 != __last1; ++__first1, (void)++__first2, ++__result)
...@@ -4355,8 +4338,8 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO ...@@ -4355,8 +4338,8 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO
{ {
// concept requirements // concept requirements
__glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
// "the type returned by a _Generator" // "the type returned by a _Generator"
__typeof__(__gen())>) __typeof__(__gen())>)
for (__decltype(__n + 0) __niter = __n; for (__decltype(__n + 0) __niter = __n;
__niter > 0; --__niter, ++__first) __niter > 0; --__niter, ++__first)
......
...@@ -264,13 +264,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -264,13 +264,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
inline void inline void
pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
{ {
typedef typename iterator_traits<_RandomAccessIterator>::value_type
_ValueType;
// concept requirements // concept requirements
__glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept< __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
_RandomAccessIterator>) _RandomAccessIterator>)
__glibcxx_function_requires(_LessThanComparableConcept<_ValueType>) __glibcxx_function_requires(_LessThanComparableConcept<
typename iterator_traits<_RandomAccessIterator>::value_type>)
__glibcxx_requires_non_empty_range(__first, __last); __glibcxx_requires_non_empty_range(__first, __last);
__glibcxx_requires_valid_range(__first, __last); __glibcxx_requires_valid_range(__first, __last);
__glibcxx_requires_irreflexive(__first, __last); __glibcxx_requires_irreflexive(__first, __last);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment