Two calls to destructor

Your output doesn’t account for the Test’s copy constructor, which std::vector is apt to use.

The Test object you see get created is the temporary passed to push_back(), not the one actually in the vector.

Leave a Comment