This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix remaining stl_rope.h implicit typename problems


Hi,

as suggested by Jason Merrill, I have prepared this fix for the remaining
implicit typename problems of stl_rope.h, tested with *both* cp_parser_branch
and current mainline compilers (on i686-pc-linux-gnu)

A simpler solution using 'typedef typename _Rope_iterator::_RopeRep _RopeRep;'
works for cp-parser-branch but *not* for the current mainline, which keeps on
emitting the "deprecated implicit typename" warning (why, by the way?)

Ok to apply?

Cheers,
Paolo.

//////////////

2001-12-20  Paolo Carlini  <pcarlini@unitus.it>

        * include/ext/stl_rope.h (class _Rope_iterator):
        Add local typedef to fix implicit typename problems.

--- stl_rope.h.orig Thu Dec 20 22:16:48 2001
+++ stl_rope.h Thu Dec 20 22:46:44 2001
@@ -1024,6 +1024,7 @@ template<class _CharT, class _Alloc>
 class _Rope_iterator : public _Rope_iterator_base<_CharT,_Alloc> {
     friend class rope<_CharT,_Alloc>;
   protected:
+    typedef typename _Rope_iterator_base<_CharT,_Alloc>::_RopeRep _RopeRep;
     rope<_CharT,_Alloc>* _M_root_rope;
         // root is treated as a cached version of this,
         // and is used to detect changes to the underlying
@@ -1057,8 +1058,7 @@ class _Rope_iterator : public _Rope_iter
         _RopeRep::_S_unref(_M_root);
     }
     _Rope_iterator& operator= (const _Rope_iterator& __x) {
-        typename
-   _Rope_iterator_base<_CharT,_Alloc>::_RopeRep* __old = _M_root;
+        _RopeRep* __old = _M_root;

         _RopeRep::_S_ref(__x._M_root);
         if (0 != __x._M_buf_ptr) {



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]