stl_iterator.h (__normal_iterator<>): Qualify dependent names with `typename'.

* include/bits/stl_iterator.h (__normal_iterator<>): Qualify
	dependent names with `typename'.  Bring in various required
	iterator_traits members.  Can't imagine why that used to work.

From-SVN: r43568
This commit is contained in:
Gabriel Dos Reis 2001-06-26 06:36:33 +00:00 committed by Gabriel Dos Reis
parent 255fcfbb81
commit 9483461dc9
2 changed files with 18 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2001-06-26 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
* include/bits/stl_iterator.h (__normal_iterator<>): Qualify
dependent names with `typename'. Bring in various required
iterator_traits members. Can't imagine why that used to work.
2001-06-25 Phil Edwards <pme@sources.redhat.com>
Kurt Garloff <garloff@suse.de>

View File

@ -443,18 +443,24 @@ private:
// _Iterator parameter is the same.
template<typename _Iterator, typename _Container>
class __normal_iterator
: public iterator<iterator_traits<_Iterator>::iterator_category,
iterator_traits<_Iterator>::value_type,
iterator_traits<_Iterator>::difference_type,
iterator_traits<_Iterator>::pointer,
iterator_traits<_Iterator>::reference>
: public iterator<typename iterator_traits<_Iterator>::iterator_category,
typename iterator_traits<_Iterator>::value_type,
typename iterator_traits<_Iterator>::difference_type,
typename iterator_traits<_Iterator>::pointer,
typename iterator_traits<_Iterator>::reference>
{
typedef iterator_traits<_Iterator> _Traits;
protected:
_Iterator _M_current;
public:
typedef __normal_iterator<_Iterator, _Container> normal_iterator_type;
typedef typename _Traits::iterator_category iterator_category;
typedef typename _Traits::value_type value_type;
typedef typename _Traits::difference_type difference_type;
typedef typename _Traits::pointer pointer;
typedef typename _Traits::reference reference;
__normal_iterator() : _M_current(_Iterator()) { }