1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
// Build don't link: class OBJECT { int a; }; template <class T> class TESTA { public: TESTA(); T foo(int i) {T t = 0; return t}; // ERROR - no semi }; void foo() { TESTA<OBJECT *> *foo; foo = new TESTA<OBJECT *>; }