You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
struct Foo
{
Foo();
~Foo();
Foo(const Foo& a);
};
vector<Foo> foo;
foo.resize(1);
foo.resize(200);//this line will call operator = on never constructed Foo, instead of copy constructor
In the end, operator = destructor will be called from never constructed elements.
this happens, because uninitialized_move_ptr uses is_trivially_copy_assignable (which is true), rather than is_trivially_copyable, I guess.
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: