[Bug c++/12883] destructor of array object not called if no prior instantiation of the template has happened
flopiano at bigfoot dot com
gcc-bugzilla@gcc.gnu.org
Mon Nov 3 18:31:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12883
------- Additional Comments From flopiano at bigfoot dot com 2003-11-03 18:31 -------
Note also that if the size of the array is explicitly specified, the destructors are correctely
called as in :
---------
extern "C" void abort ();
template <int> struct X {
X(int) { }
~X() { abort(); }
};
int main() {
X<0> array[1] = { 0 }; // <-- specify size
}
--------
More information about the Gcc-bugs
mailing list