I can't get my head around RVO (and NRVO) definition because of multiple questions like this one that to me look assuming that RVO omits a copy constructor. Now according to 12.8.15
In such cases, the implementation treats the source and target of the omitted copy operation as simply two different ways of referring to the same object, and the destruction of that object occurs at the later of the times when the two objects would have been destroyed without the optimization.
Which looks like it's not the copy constructor call is being omitted, but the copy itself - just the object is constructed at the "copy" location in the first place and so there's no "original" object and no copying at all. So even when a class has a private
copy constructor it can be returned from a function when RVO kicks in because there's no copy.
Do I get it right? Is the copying itself omitted or is the copy constructor invokation omitted? Should returning an object from a function be allowed when the object class has a private copy constructor?