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

--- Comment #2 from Kohei Takahashi <flast at flast dot jp> ---
(In reply to Andrew Pinski from comment #1)
> in C++14 (a) means the same as static_cast<typeof(a) &>(a).
> 
> So it is a reference at this point which means const & is better than &&.
> 
> Or at least that is how I understand this.  Does clang implement the C++11
> () rule correctly?

n3376 12.8 [class.copy] paragraph 32 says:

    When the criteria for elision of a copy operation are met or would be met
save for the fact that the source
    object is a function parameter, and the object to be copied is designated
by an lvalue, overload resolution to
    select the constructor for the copy is first performed as if the object
were designated by an rvalue.

And latest draft says more clearly.
https://github.com/cplusplus/draft/blob/master/source/special.tex#L3021-L3062

Therefore, I think move should be performed even if parenthesized.

Reply via email to