This is the mail archive of the gcc@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]

Re: -pedantic and typedef inheritance.


On 8 Jan 2000, Alexandre Oliva wrote:

> Your code is wrong, but it is accepted without -pedantic as an
> extension.  According to the C++ Standard, template-dependent base
> classes are not examined during template parsing.  Inherited members,
> including typenames, must be qualified and prefixed by the `typename'
> keyword:
> 
>         typename Base3<Derived3<_TD>>::T_Generic t = 2;
> 

Thanks for the response. I still don't quite get it. Is the qualification
required (according to ANSI/ISO) of all members (data, functions and
typdefs in the example) or just of the typedefs ? It seems that the data
members inherit (or is it just that no diagnostic is required). 

I know this is not comp.c++.for.dummies. So if this is off-topic, I'll
appreciate a reference. I've got the ISO/ANSI C++ standard, but it is
still a bit foreign to me.

Gerhard Esterhuizen                     <gesterhuizen@bigfoot.com>

  Digital Signal Processing
  University of Stellenbosch
  South Africa
  
  +27-21-808-4315

  
"You will never be happy if you continue to search for what happiness
consists of. 
You will never live if you are looking for the
meaning of life."
                    --Albert Camus
                          (1913 - 1960)





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