[Bug c++/39798] would like flag to disable constructors for built-in types
falk at debian dot org
gcc-bugzilla@gcc.gnu.org
Mon Apr 20 15:28:00 GMT 2009
------- Comment #1 from falk at debian dot org 2009-04-20 15:28 -------
Removing the default constructor is a bad idea, since it would break about any
available library including the standard lib in subtle ways, and would make g++
pretty much unusable.
But apparently this isn't actually what you really want anyway, but actually
you want to be able to create STL containers with uninitialized memory. This
seems to me a pretty unusual requirement, and it could be achieved by creating
a wrapper class for int with empty constructor, so I don't think this justifies
language or library changes.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39798
More information about the Gcc-bugs
mailing list