mizvekov added a comment.

In D99005#2859476 <https://reviews.llvm.org/D99005#2859476>, @aaron.ballman 
wrote:

> https://godbolt.org/z/dvEbv7GKo
>
> I'm not certain if this is as expected of an issue, though. In the original 
> example, `C` carried state that was set up after initialization but was 
> relying on the fallback to the non-idiomatic copy constructor when doing the 
> `throw`. WDYT?

Yeah that is the equivalent scenario for `throw`, we treat c1 as a temporary 
there. The same workaround applies, you can static cast to non-const lvalue 
reference.

As far as the implementation is concerned, it is following the proposal to the 
letter here.
And as I understand it, although I am not the author of the proposal (which is 
@Quuxplusone), the committee agrees that this breakage is a good thing.

In D99005#2859652 <https://reviews.llvm.org/D99005#2859652>, @aaron.ballman 
wrote:

> I'm not certain it's reasonable to wait for MSVC STL to change as that leaves 
> every existing user of older MSVC STLs out in the cold. This is causing some 
> significant regressions at Intel, to the extent that I wonder if this should 
> be temporarily reverted until the MSVC STL headers can be compiled again.

That does interfere with the wishes of the committee to get implementation 
experience with this.
I am not saying one way or another, but would leaving this effect on by 
default, but providing a command line flag to turn it off, be a reasonable 
option on the table?


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