stl_iterator.h (operator-(const reverse_iterator<>&, const reverse_iterator<>&), [...]): Use the auto -> return type syntax, implement DR 685.
2008-10-07 Paolo Carlini <paolo.carlini@oracle.com> * include/bits/stl_iterator.h (operator-(const reverse_iterator<>&, const reverse_iterator<>&), operator-(const __normal_iterator<>&, const __normal_iterator<>&), operator-(const move_iterator<>&, const move_iterator<>&)): Use the auto -> return type syntax, implement DR 685. From-SVN: r140937
This commit is contained in:
parent
ebca2d9129
commit
5defb0f208
2 changed files with 27 additions and 1 deletions
|
@ -1,3 +1,11 @@
|
|||
2008-10-07 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
* include/bits/stl_iterator.h (operator-(const reverse_iterator<>&,
|
||||
const reverse_iterator<>&), operator-(const __normal_iterator<>&,
|
||||
const __normal_iterator<>&), operator-(const move_iterator<>&,
|
||||
const move_iterator<>&)): Use the auto -> return type syntax,
|
||||
implement DR 685.
|
||||
|
||||
2008-10-06 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* config/abi/pre/gnu.ver: Update char16/32_t manglings.
|
||||
|
|
|
@ -365,9 +365,17 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
{ return !(__x < __y); }
|
||||
|
||||
template<typename _IteratorL, typename _IteratorR>
|
||||
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||
// DR 685.
|
||||
inline auto
|
||||
operator-(const reverse_iterator<_IteratorL>& __x,
|
||||
const reverse_iterator<_IteratorR>& __y)
|
||||
-> decltype(__y.base() - __x.base())
|
||||
#else
|
||||
inline typename reverse_iterator<_IteratorL>::difference_type
|
||||
operator-(const reverse_iterator<_IteratorL>& __x,
|
||||
const reverse_iterator<_IteratorR>& __y)
|
||||
#endif
|
||||
{ return __y.base() - __x.base(); }
|
||||
//@}
|
||||
|
||||
|
@ -835,9 +843,17 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
|||
// operators but also operator- must accept mixed iterator/const_iterator
|
||||
// parameters.
|
||||
template<typename _IteratorL, typename _IteratorR, typename _Container>
|
||||
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||
// DR 685.
|
||||
inline auto
|
||||
operator-(const __normal_iterator<_IteratorL, _Container>& __lhs,
|
||||
const __normal_iterator<_IteratorR, _Container>& __rhs)
|
||||
-> decltype(__lhs.base() - __rhs.base())
|
||||
#else
|
||||
inline typename __normal_iterator<_IteratorL, _Container>::difference_type
|
||||
operator-(const __normal_iterator<_IteratorL, _Container>& __lhs,
|
||||
const __normal_iterator<_IteratorR, _Container>& __rhs)
|
||||
#endif
|
||||
{ return __lhs.base() - __rhs.base(); }
|
||||
|
||||
template<typename _Iterator, typename _Container>
|
||||
|
@ -1001,10 +1017,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
const move_iterator<_IteratorR>& __y)
|
||||
{ return !(__x < __y); }
|
||||
|
||||
// DR 685.
|
||||
template<typename _IteratorL, typename _IteratorR>
|
||||
inline typename move_iterator<_IteratorL>::difference_type
|
||||
inline auto
|
||||
operator-(const move_iterator<_IteratorL>& __x,
|
||||
const move_iterator<_IteratorR>& __y)
|
||||
-> decltype(__x.base() - __y.base())
|
||||
{ return __x.base() - __y.base(); }
|
||||
|
||||
template<typename _Iterator>
|
||||
|
|
Loading…
Add table
Reference in a new issue