https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70551

--- Comment #2 from Roland B <rbock at eudoxos dot de> ---
(In reply to Jonathan Wakely from comment #1)
> Your interpretation would mean that whether a compiler performs copy elision
> would change whether a program is well-formed or not (rather than only
> changing whether any side effects of the constructor call happen). That is
> not a reasonable interpretation IMHO.

I see your point, but when I remove the definition from the code, it compiles
just fine, because the definition is irrelevant in case of copy elision.

So I could have the move constructor's declaration in file A and the definition
in file B. If the definition is irrelevant, why would it matter whether or not
I include the file B containing the definition?

Reply via email to