stl_heap.h: Fully qualify standard functions with std::, thus avoiding Koenig lookup.
2003-07-04 Paolo Carlini <pcarlini@unitus.it> * include/bits/stl_heap.h: Fully qualify standard functions with std::, thus avoiding Koenig lookup. * include/bits/stl_iterator_base_funcs.h: Likewise. * include/bits/stl_algo.h: Qualify __iterator_category too. * include/bits/stl_algobase.h: Likewise. * include/bits/stl_bvector.h: Likewise. * include/bits/stl_algo.h: Don't qualify the pair type. From-SVN: r68915
This commit is contained in:
parent
68e1f6219c
commit
369b78b0e4
@ -1,3 +1,15 @@
|
||||
2003-07-04 Paolo Carlini <pcarlini@unitus.it>
|
||||
|
||||
* include/bits/stl_heap.h: Fully qualify standard
|
||||
functions with std::, thus avoiding Koenig lookup.
|
||||
* include/bits/stl_iterator_base_funcs.h: Likewise.
|
||||
|
||||
* include/bits/stl_algo.h: Qualify __iterator_category too.
|
||||
* include/bits/stl_algobase.h: Likewise.
|
||||
* include/bits/stl_bvector.h: Likewise.
|
||||
|
||||
* include/bits/stl_algo.h: Don't qualify the pair type.
|
||||
|
||||
2003-07-03 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
* include/Makefile.am (target_headers): Add fpos.h
|
||||
|
@ -295,7 +295,7 @@ namespace std
|
||||
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
|
||||
__glibcpp_function_requires(_EqualOpConcept<
|
||||
typename iterator_traits<_InputIterator>::value_type, _Tp>)
|
||||
return std::find(__first, __last, __val, __iterator_category(__first));
|
||||
return std::find(__first, __last, __val, std::__iterator_category(__first));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -315,7 +315,7 @@ namespace std
|
||||
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
|
||||
__glibcpp_function_requires(_UnaryPredicateConcept<_Predicate,
|
||||
typename iterator_traits<_InputIterator>::value_type>)
|
||||
return std::find_if(__first, __last, __pred, __iterator_category(__first));
|
||||
return std::find_if(__first, __last, __pred, std::__iterator_category(__first));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1352,7 +1352,7 @@ namespace std
|
||||
// concept requirements
|
||||
__glibcpp_function_requires(_Mutable_BidirectionalIteratorConcept<
|
||||
_BidirectionalIterator>)
|
||||
std::__reverse(__first, __last, __iterator_category(__first));
|
||||
std::__reverse(__first, __last, std::__iterator_category(__first));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1754,7 +1754,7 @@ namespace std
|
||||
__glibcpp_function_requires(_UnaryPredicateConcept<_Predicate,
|
||||
typename iterator_traits<_ForwardIterator>::value_type>)
|
||||
|
||||
return std::__partition(__first, __last, __pred, __iterator_category(__first));
|
||||
return std::__partition(__first, __last, __pred, std::__iterator_category(__first));
|
||||
}
|
||||
|
||||
|
||||
@ -3469,10 +3469,10 @@ namespace std
|
||||
__left = std::lower_bound(__first, __middle, __val);
|
||||
std::advance(__first, __len);
|
||||
__right = std::upper_bound(++__middle, __first, __val);
|
||||
return std::pair<_ForwardIterator, _ForwardIterator>(__left, __right);
|
||||
return pair<_ForwardIterator, _ForwardIterator>(__left, __right);
|
||||
}
|
||||
}
|
||||
return std::pair<_ForwardIterator, _ForwardIterator>(__first, __first);
|
||||
return pair<_ForwardIterator, _ForwardIterator>(__first, __first);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3524,10 +3524,10 @@ namespace std
|
||||
__left = std::lower_bound(__first, __middle, __val, __comp);
|
||||
std::advance(__first, __len);
|
||||
__right = std::upper_bound(++__middle, __first, __val, __comp);
|
||||
return std::pair<_ForwardIterator, _ForwardIterator>(__left, __right);
|
||||
return pair<_ForwardIterator, _ForwardIterator>(__left, __right);
|
||||
}
|
||||
}
|
||||
return std::pair<_ForwardIterator, _ForwardIterator>(__first, __first);
|
||||
return pair<_ForwardIterator, _ForwardIterator>(__first, __first);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -4320,8 +4320,8 @@ namespace std
|
||||
typename iterator_traits<_ForwardIterator2>::value_type>)
|
||||
|
||||
return std::__find_end(__first1, __last1, __first2, __last2,
|
||||
__iterator_category(__first1),
|
||||
__iterator_category(__first2));
|
||||
std::__iterator_category(__first1),
|
||||
std::__iterator_category(__first2));
|
||||
}
|
||||
|
||||
template<typename _ForwardIterator1, typename _ForwardIterator2,
|
||||
@ -4339,8 +4339,8 @@ namespace std
|
||||
typename iterator_traits<_ForwardIterator2>::value_type>)
|
||||
|
||||
return std::__find_end(__first1, __last1, __first2, __last2,
|
||||
__iterator_category(__first1),
|
||||
__iterator_category(__first2),
|
||||
std::__iterator_category(__first1),
|
||||
std::__iterator_category(__first2),
|
||||
__comp);
|
||||
}
|
||||
|
||||
|
@ -248,13 +248,13 @@ namespace std
|
||||
inline _OutputIterator
|
||||
__copy_aux2(_InputIterator __first, _InputIterator __last,
|
||||
_OutputIterator __result, __false_type)
|
||||
{ return std::__copy(__first, __last, __result, __iterator_category(__first)); }
|
||||
{ return std::__copy(__first, __last, __result, std::__iterator_category(__first)); }
|
||||
|
||||
template<typename _InputIterator, typename _OutputIterator>
|
||||
inline _OutputIterator
|
||||
__copy_aux2(_InputIterator __first, _InputIterator __last,
|
||||
_OutputIterator __result, __true_type)
|
||||
{ return std::__copy(__first, __last, __result, __iterator_category(__first)); }
|
||||
{ return std::__copy(__first, __last, __result, std::__iterator_category(__first)); }
|
||||
|
||||
template<typename _Tp>
|
||||
inline _Tp*
|
||||
@ -370,7 +370,7 @@ namespace std
|
||||
_BidirectionalIterator2 __result)
|
||||
{
|
||||
return std::__copy_backward(__first, __last, __result,
|
||||
__iterator_category(__first));
|
||||
std::__iterator_category(__first));
|
||||
}
|
||||
};
|
||||
|
||||
@ -594,7 +594,7 @@ namespace std
|
||||
++__first1;
|
||||
++__first2;
|
||||
}
|
||||
return std::pair<_InputIterator1, _InputIterator2>(__first1, __first2);
|
||||
return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -625,7 +625,7 @@ namespace std
|
||||
++__first1;
|
||||
++__first2;
|
||||
}
|
||||
return std::pair<_InputIterator1, _InputIterator2>(__first1, __first2);
|
||||
return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -522,7 +522,7 @@ template <typename _Alloc>
|
||||
template <class _InputIterator>
|
||||
void _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
|
||||
__false_type) {
|
||||
_M_initialize_range(__first, __last, __iterator_category(__first));
|
||||
_M_initialize_range(__first, __last, std::__iterator_category(__first));
|
||||
}
|
||||
|
||||
template <class _InputIterator>
|
||||
@ -577,7 +577,7 @@ template <typename _Alloc>
|
||||
|
||||
template <class _InputIterator>
|
||||
void _M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type)
|
||||
{ _M_assign_aux(__first, __last, __iterator_category(__first)); }
|
||||
{ _M_assign_aux(__first, __last, std::__iterator_category(__first)); }
|
||||
|
||||
template <class _InputIterator>
|
||||
void _M_assign_aux(_InputIterator __first, _InputIterator __last,
|
||||
@ -662,7 +662,7 @@ template <typename _Alloc>
|
||||
void _M_insert_dispatch(iterator __pos,
|
||||
_InputIterator __first, _InputIterator __last,
|
||||
__false_type) {
|
||||
_M_insert_range(__pos, __first, __last, __iterator_category(__first));
|
||||
_M_insert_range(__pos, __first, __last, std::__iterator_category(__first));
|
||||
}
|
||||
|
||||
template <class _InputIterator>
|
||||
|
@ -93,8 +93,8 @@ namespace std
|
||||
_RandomAccessIterator>)
|
||||
__glibcpp_function_requires(_LessThanComparableConcept<_ValueType>)
|
||||
|
||||
__push_heap(__first, _DistanceType((__last - __first) - 1), _DistanceType(0),
|
||||
_ValueType(*(__last - 1)));
|
||||
std::__push_heap(__first, _DistanceType((__last - __first) - 1), _DistanceType(0),
|
||||
_ValueType(*(__last - 1)));
|
||||
}
|
||||
|
||||
template<typename _RandomAccessIterator, typename _Distance, typename _Tp,
|
||||
@ -126,8 +126,8 @@ namespace std
|
||||
__glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
|
||||
_RandomAccessIterator>)
|
||||
|
||||
__push_heap(__first, _DistanceType((__last - __first) - 1), _DistanceType(0),
|
||||
_ValueType(*(__last - 1)), __comp);
|
||||
std::__push_heap(__first, _DistanceType((__last - __first) - 1), _DistanceType(0),
|
||||
_ValueType(*(__last - 1)), __comp);
|
||||
}
|
||||
|
||||
template<typename _RandomAccessIterator, typename _Distance, typename _Tp>
|
||||
@ -148,7 +148,7 @@ namespace std
|
||||
*(__first + __holeIndex) = *(__first + (__secondChild - 1));
|
||||
__holeIndex = __secondChild - 1;
|
||||
}
|
||||
__push_heap(__first, __holeIndex, __topIndex, __value);
|
||||
std::__push_heap(__first, __holeIndex, __topIndex, __value);
|
||||
}
|
||||
|
||||
template<typename _RandomAccessIterator, typename _Tp>
|
||||
@ -158,7 +158,7 @@ namespace std
|
||||
{
|
||||
typedef typename iterator_traits<_RandomAccessIterator>::difference_type _Distance;
|
||||
*__result = *__first;
|
||||
__adjust_heap(__first, _Distance(0), _Distance(__last - __first), __value);
|
||||
std::__adjust_heap(__first, _Distance(0), _Distance(__last - __first), __value);
|
||||
}
|
||||
|
||||
template<typename _RandomAccessIterator>
|
||||
@ -172,7 +172,7 @@ namespace std
|
||||
_RandomAccessIterator>)
|
||||
__glibcpp_function_requires(_LessThanComparableConcept<_ValueType>)
|
||||
|
||||
__pop_heap(__first, __last - 1, __last - 1, _ValueType(*(__last - 1)));
|
||||
std::__pop_heap(__first, __last - 1, __last - 1, _ValueType(*(__last - 1)));
|
||||
}
|
||||
|
||||
template<typename _RandomAccessIterator, typename _Distance,
|
||||
@ -194,7 +194,7 @@ namespace std
|
||||
*(__first + __holeIndex) = *(__first + (__secondChild - 1));
|
||||
__holeIndex = __secondChild - 1;
|
||||
}
|
||||
__push_heap(__first, __holeIndex, __topIndex, __value, __comp);
|
||||
std::__push_heap(__first, __holeIndex, __topIndex, __value, __comp);
|
||||
}
|
||||
|
||||
template<typename _RandomAccessIterator, typename _Tp, typename _Compare>
|
||||
@ -204,8 +204,8 @@ namespace std
|
||||
{
|
||||
typedef typename iterator_traits<_RandomAccessIterator>::difference_type _Distance;
|
||||
*__result = *__first;
|
||||
__adjust_heap(__first, _Distance(0), _Distance(__last - __first),
|
||||
__value, __comp);
|
||||
std::__adjust_heap(__first, _Distance(0), _Distance(__last - __first),
|
||||
__value, __comp);
|
||||
}
|
||||
|
||||
template<typename _RandomAccessIterator, typename _Compare>
|
||||
@ -218,7 +218,7 @@ namespace std
|
||||
_RandomAccessIterator>)
|
||||
|
||||
typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType;
|
||||
__pop_heap(__first, __last - 1, __last - 1, _ValueType(*(__last - 1)), __comp);
|
||||
std::__pop_heap(__first, __last - 1, __last - 1, _ValueType(*(__last - 1)), __comp);
|
||||
}
|
||||
|
||||
template<typename _RandomAccessIterator>
|
||||
@ -240,7 +240,7 @@ namespace std
|
||||
_DistanceType __parent = (__len - 2)/2;
|
||||
|
||||
while (true) {
|
||||
__adjust_heap(__first, __parent, __len, _ValueType(*(__first + __parent)));
|
||||
std::__adjust_heap(__first, __parent, __len, _ValueType(*(__first + __parent)));
|
||||
if (__parent == 0) return;
|
||||
__parent--;
|
||||
}
|
||||
@ -265,8 +265,8 @@ namespace std
|
||||
_DistanceType __parent = (__len - 2)/2;
|
||||
|
||||
while (true) {
|
||||
__adjust_heap(__first, __parent, __len,
|
||||
_ValueType(*(__first + __parent)), __comp);
|
||||
std::__adjust_heap(__first, __parent, __len,
|
||||
_ValueType(*(__first + __parent)), __comp);
|
||||
if (__parent == 0) return;
|
||||
__parent--;
|
||||
}
|
||||
@ -283,7 +283,7 @@ namespace std
|
||||
typename iterator_traits<_RandomAccessIterator>::value_type>)
|
||||
|
||||
while (__last - __first > 1)
|
||||
pop_heap(__first, __last--);
|
||||
std::pop_heap(__first, __last--);
|
||||
}
|
||||
|
||||
template<typename _RandomAccessIterator, typename _Compare>
|
||||
@ -296,7 +296,7 @@ namespace std
|
||||
_RandomAccessIterator>)
|
||||
|
||||
while (__last - __first > 1)
|
||||
pop_heap(__first, __last--, __comp);
|
||||
std::pop_heap(__first, __last--, __comp);
|
||||
}
|
||||
|
||||
} // namespace std
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Functions used by iterators -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2001, 2002, 2003 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
|
||||
@ -111,7 +111,7 @@ namespace std
|
||||
distance(_InputIterator __first, _InputIterator __last)
|
||||
{
|
||||
// concept requirements -- taken care of in __distance
|
||||
return __distance(__first, __last, __iterator_category(__first));
|
||||
return std::__distance(__first, __last, std::__iterator_category(__first));
|
||||
}
|
||||
|
||||
template<typename _InputIterator, typename _Distance>
|
||||
@ -164,7 +164,7 @@ namespace std
|
||||
advance(_InputIterator& __i, _Distance __n)
|
||||
{
|
||||
// concept requirements -- taken care of in __advance
|
||||
__advance(__i, __n, __iterator_category(__i));
|
||||
std::__advance(__i, __n, std::__iterator_category(__i));
|
||||
}
|
||||
} // namespace std
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user