This is the mail archive of the egcs@egcs.cygnus.com mailing list for the EGCS project. See the EGCS home page for more information.


[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]

Re: [Q] bug with -pedantic option ???



Hi,

In templates you need to use 'typename' to access a subtype
of a dependent type. That is the definition of 'f()' should
look like this:

  template <class Type>
  void
  X<Type >::f()
  {
    typename list<Type>::const_iterator it1;
  }

BTW, you don't need a semicolon after a function definition.