------- Comment #2 from pcarlini at suse dot de 2008-01-17 23:21 ------- The behavior is correct. First the default constructor is used in resize, then (you can't see it with the snippet) the copy constructor binds to that default constructed element, used in 3 placement new; finally the destructor runs on the default constructed element. Then again default constructor, destructor, the same, and one additional destructor due to the resize to 2 positions (the last element is destroyed).
-- pcarlini at suse dot de changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34839