On Wed, 6 Feb 2019 at 15:12, Ville Voutilainen
<ville.voutilainen@gmail.com> wrote:
And, to emphasize, the most important reason for this was to be able
to write straightforward
code for the special member functions, with the hope that it wouldn't
have a negative codegen
effect. Our Microsoft friends described the general technique as "has
crazy-good codegen",
but I have no idea what their starting point was; our starting point
probably wasn't bad
to begin with.
However, the codegen should be somewhat improved; this patch removes a
bag of run-time ifs from the implementation.
An amended patch attached. This gets rid of all __erased* stuff,
including hash, swap, constructors, relops.
I consider variant to no longer be in the state of sin after this.
Since this is touching just a C++17 facility with no
impact elsewhere, we could consider landing it in GCC 9 as a late
change. Failing that, it certainly seems safe enough
to put into GCC 9.2.