It contains an implicit constructor because the function it is calling takes a
VectorXd& argument. Whenever you call an argument, you’re essentially assigning to the function argument variables.
The assignment operator
operator=(const T&) and the copy construtor
T(const T&) almost always do the same thing. And it’s almost always a copy, hence the name.
The way to reason about it is to keep track which container classes manage memory for their elements.
Map does not manage memory, but
Eigen::Matrix do. A pointer in C or C++ does not manage memory.
Whenever you construct a container or assign to a container that manages its own memory, there’s a copy involved.
C++11 has move semantics which avoid some of this copying by transferring control of the memory from the right-hand-side element to the left hand side. This invalidates the right-hand side object.