December 14, 2005 Compiler in endless loop | ||||
---|---|---|---|---|
| ||||
Hello, when compiling folowing example with DMC V8.44.6n the compiler reports the unknown pointer in the destructor of template PADEL and then hangs. It can only be terminated by Control-C Example: template<class T> class PADEL { public: PADEL(T* p) : ptr(p) {} ~PADEL() {delete[] p;} // p is mistake, wanted ptr private: T *ptr; }; int main() { int *ip = new int[10]; PADEL<int> ip_care(ip); return 0; } I know that I don't have the latest version. So if it's already solved I will download the latest DMC. - Heinz |
Copyright © 1999-2021 by the D Language Foundation