mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
639fa8a319
commit
ec494945a9
|
|
@ -1,3 +1,14 @@
|
|||
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>
|
||||
|
||||
* testsuite/26_numerics/complex/requirements/constexpr.cc
|
||||
|
|
|
|||
|
|
@ -1735,12 +1735,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
_RandomAccessIterator __result_first,
|
||||
_RandomAccessIterator __result_last)
|
||||
{
|
||||
#ifdef _GLIBCXX_CONCEPT_CHECKS
|
||||
typedef typename iterator_traits<_InputIterator>::value_type
|
||||
_InputValueType;
|
||||
typedef typename iterator_traits<_RandomAccessIterator>::value_type
|
||||
_OutputValueType;
|
||||
typedef typename iterator_traits<_RandomAccessIterator>::difference_type
|
||||
_DistanceType;
|
||||
#endif
|
||||
|
||||
// concept requirements
|
||||
__glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
|
||||
|
|
@ -1786,12 +1786,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
_RandomAccessIterator __result_last,
|
||||
_Compare __comp)
|
||||
{
|
||||
#ifdef _GLIBCXX_CONCEPT_CHECKS
|
||||
typedef typename iterator_traits<_InputIterator>::value_type
|
||||
_InputValueType;
|
||||
typedef typename iterator_traits<_RandomAccessIterator>::value_type
|
||||
_OutputValueType;
|
||||
typedef typename iterator_traits<_RandomAccessIterator>::difference_type
|
||||
_DistanceType;
|
||||
#endif
|
||||
|
||||
// concept requirements
|
||||
__glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
|
||||
|
|
@ -2020,13 +2020,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
lower_bound(_ForwardIterator __first, _ForwardIterator __last,
|
||||
const _Tp& __val, _Compare __comp)
|
||||
{
|
||||
typedef typename iterator_traits<_ForwardIterator>::value_type
|
||||
_ValueType;
|
||||
|
||||
// concept requirements
|
||||
__glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
|
||||
__glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
|
||||
_ValueType, _Tp>)
|
||||
typename iterator_traits<_ForwardIterator>::value_type, _Tp>)
|
||||
__glibcxx_requires_partitioned_lower_pred(__first, __last,
|
||||
__val, __comp);
|
||||
__glibcxx_requires_irreflexive_pred2(__first, __last, __comp);
|
||||
|
|
@ -2078,12 +2075,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
upper_bound(_ForwardIterator __first, _ForwardIterator __last,
|
||||
const _Tp& __val)
|
||||
{
|
||||
typedef typename iterator_traits<_ForwardIterator>::value_type
|
||||
_ValueType;
|
||||
|
||||
// concept requirements
|
||||
__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_irreflexive2(__first, __last);
|
||||
|
||||
|
|
@ -2111,13 +2106,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
upper_bound(_ForwardIterator __first, _ForwardIterator __last,
|
||||
const _Tp& __val, _Compare __comp)
|
||||
{
|
||||
typedef typename iterator_traits<_ForwardIterator>::value_type
|
||||
_ValueType;
|
||||
|
||||
// concept requirements
|
||||
__glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
|
||||
__glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
|
||||
_Tp, _ValueType>)
|
||||
_Tp, typename iterator_traits<_ForwardIterator>::value_type>)
|
||||
__glibcxx_requires_partitioned_upper_pred(__first, __last,
|
||||
__val, __comp);
|
||||
__glibcxx_requires_irreflexive_pred2(__first, __last, __comp);
|
||||
|
|
@ -2186,13 +2178,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
equal_range(_ForwardIterator __first, _ForwardIterator __last,
|
||||
const _Tp& __val)
|
||||
{
|
||||
typedef typename iterator_traits<_ForwardIterator>::value_type
|
||||
_ValueType;
|
||||
|
||||
// concept requirements
|
||||
__glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
|
||||
__glibcxx_function_requires(_LessThanOpConcept<_ValueType, _Tp>)
|
||||
__glibcxx_function_requires(_LessThanOpConcept<_Tp, _ValueType>)
|
||||
__glibcxx_function_requires(_LessThanOpConcept<
|
||||
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_upper(__first, __last, __val);
|
||||
__glibcxx_requires_irreflexive2(__first, __last);
|
||||
|
|
@ -2224,15 +2215,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
equal_range(_ForwardIterator __first, _ForwardIterator __last,
|
||||
const _Tp& __val, _Compare __comp)
|
||||
{
|
||||
typedef typename iterator_traits<_ForwardIterator>::value_type
|
||||
_ValueType;
|
||||
|
||||
// concept requirements
|
||||
__glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
|
||||
__glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
|
||||
_ValueType, _Tp>)
|
||||
typename iterator_traits<_ForwardIterator>::value_type, _Tp>)
|
||||
__glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
|
||||
_Tp, _ValueType>)
|
||||
_Tp, typename iterator_traits<_ForwardIterator>::value_type>)
|
||||
__glibcxx_requires_partitioned_lower_pred(__first, __last,
|
||||
__val, __comp);
|
||||
__glibcxx_requires_partitioned_upper_pred(__first, __last,
|
||||
|
|
@ -2261,12 +2249,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
binary_search(_ForwardIterator __first, _ForwardIterator __last,
|
||||
const _Tp& __val)
|
||||
{
|
||||
typedef typename iterator_traits<_ForwardIterator>::value_type
|
||||
_ValueType;
|
||||
|
||||
// concept requirements
|
||||
__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_upper(__first, __last, __val);
|
||||
__glibcxx_requires_irreflexive2(__first, __last);
|
||||
|
|
@ -2297,13 +2283,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
binary_search(_ForwardIterator __first, _ForwardIterator __last,
|
||||
const _Tp& __val, _Compare __comp)
|
||||
{
|
||||
typedef typename iterator_traits<_ForwardIterator>::value_type
|
||||
_ValueType;
|
||||
|
||||
// concept requirements
|
||||
__glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
|
||||
__glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
|
||||
_Tp, _ValueType>)
|
||||
_Tp, typename iterator_traits<_ForwardIterator>::value_type>)
|
||||
__glibcxx_requires_partitioned_lower_pred(__first, __last,
|
||||
__val, __comp);
|
||||
__glibcxx_requires_partitioned_upper_pred(__first, __last,
|
||||
|
|
|
|||
|
|
@ -264,13 +264,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
inline void
|
||||
pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
|
||||
{
|
||||
typedef typename iterator_traits<_RandomAccessIterator>::value_type
|
||||
_ValueType;
|
||||
|
||||
// concept requirements
|
||||
__glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
|
||||
_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_valid_range(__first, __last);
|
||||
__glibcxx_requires_irreflexive(__first, __last);
|
||||
|
|
|
|||
Loading…
Reference in New Issue