slight correction for templates intro
Bill Baxter
wbaxter at gmail.com
Sun Oct 15 00:28:22 PDT 2006
On the templates revisited page:
http://www.digitalmars.com/d/templates-revisited.html
It gives some example of C++ templates:
template<T, U> class Bar { ... };
template<T, U> T foo(T t, U u) { ... }
template<T, U> static T abc;
These should have 'class' or 'typename' before the type parameters:
template<class T, class U> class Bar { ... };
template<class T, class U> T foo(T t, U u) { ... }
template<class T, class U> static T abc;
Makes the D version look even cleaner. :-)
--bb
More information about the Digitalmars-d
mailing list