Is the copy constructor of A called, thus creating an object independent from the one returned (by reference) by the function?
Yes. The copy constructor takes a reference to the source object as it's parameter and a copy is independent of the original object assuming the copy constructor does a deep copy.
Yes. The copy constructor takes a reference to the source object as it's parameter and a copy is independent of the original object assuming the copy constructor does a deep copy.