- The cwg2563 issue is fixed by delaying GRO initialization only when the types mismatch between GRO and function return.
- When the types match, directly initialize, enabling RVO to kick in as introduced in https://reviews.llvm.org/D117087
Background:
https://github.com/llvm/llvm-project/issues/56532
https://cplusplus.github.io/CWG/issues/2563.html
https://github.com/cplusplus/papers/issues/1414
Depends on D145639
I feel it would slightly better to claim that the RVO is till performed if the return type matches with the type of get_return_object(). So that the users won't get worries.