This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

Templates and inheritance of types


[ Cc: Mark, 'cause I realized that you made a couple of changes in
  related code recently... ]
  

For the small snippet below,

---- snippet ----
#include <vector>

template <class T>
class C : public vector<T>
    {
    C( typename /*vector<T>::*/const_iterator b )
        { }
    };
---- snippet ----

egcs-main-CVS gives me 

  6: parse error before `)'
  7: missing ';' before right brace

unless I uncomment the  vector<T>::  in line 6. This does not happen
with egcs-1.1-CVS, which simply compiles the example.

Is it really necessary to explicitely write  vector<T>:: ?
I.e., which of egcs-1.1 and egcs-main is wrong?

Gerald
-- 
Gerald Pfeifer (Jerry)      Vienna University of Technology
pfeifer@dbai.tuwien.ac.at   http://www.dbai.tuwien.ac.at/~pfeifer/



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