Comparison chart of D and C++ templates

Walter Bright newshound at digitalmars.com
Fri Jan 19 12:16:10 PST 2007


Yauheni Akhotnikau wrote:
> it's more correctly to use protected or public keyword in Foo, I think:

Right.

> I think the same situation is in your sample, because Foo<T> is a 
> template class and it is necessary to use 'typename Foo<T>::' as a 
> prefix for A in Base. So, do you think your sample 'Dependent Base Class 
> Lookup' is correct in this context? May be better to speak about access 
> to typedefs/alias in D's templates without 'typename' keyword?

I agree, we need a typename example.



More information about the Digitalmars-d-announce mailing list