mizvekov added a comment.

In D99005#2844332 <https://reviews.llvm.org/D99005#2844332>, @zahiraam wrote:

> This change has made this snippet fail.
> https://godbolt.org/z/3ehK784hY Pass
> https://godbolt.org/z/9q48WvsP7 fails.

Hello!
That is expected breakage from the changes proposed in P2266 
<https://reviews.llvm.org/P2266>.
With simpler implicit move, we no longer have a fallback second overload 
resolution where the return expression would be an l-value and would thus bind 
to that non-const copy constructor.
You can work that around by introducing an explicit cast to lvalue reference, 
like this: https://godbolt.org/z/EhYbhYjch

But is this example a reduction from a real world code base?
The committee wants feedback and we are interested how hard you believe this 
change affects you.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99005/new/

https://reviews.llvm.org/D99005

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to