[Bug libstdc++/42242] vector::resize unnecessarily calls null constructor
redi at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Dec 1 18:22:00 GMT 2009
------- Comment #1 from redi at gcc dot gnu dot org 2009-12-01 18:21 -------
this is caused by the default argument to resize:
void
resize(size_type __new_size, value_type __x = value_type());
It would be possible to avoid the default construction by replacing that member
with two overloads of resize, but I'm not sure it's worth doing.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42242
More information about the Gcc-bugs
mailing list