Reputation: 5805
I have an auto reference to a vector:
auto &myVector = solution->myVector;
where solution->myVector is a public member, a vector of some objects.
If I later do this in the code:
myVector = someOtherVector;
will solution->myVector change?
Thanks
Upvotes: 0
Views: 165
Reputation: 6999
Yes. This will call myVector.operator=()
which is, in fact, solution->myVector.operator=()
.
Upvotes: 3