October 15, 2006 slight correction for templates intro | ||||
---|---|---|---|---|
| ||||
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 |
October 15, 2006 Re: slight correction for templates intro | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | Will do. Thanks. |
Copyright © 1999-2021 by the D Language Foundation