Quick A: It needs it when the container is a
vector or similar, because the container may need to grow and reallocate which includes moving or copying the existing contents to the new location.
why does emplace_back need move constructor?
I have the following code... But the
emplace_backdoesn't use the move constructor. Why does the initialization require a move constructor in this instance?

Add a Comment
Comments are closed.