[v3 PATCH] Use single-visitation in variant assignment and swap.
Mon Apr 1 08:45:00 GMT 2019
On Sat, 30 Mar 2019 at 20:00, Ville Voutilainen
> This patch makes assignments correct, because they need to
> match indices instead of types. In addition, we cut down the
> codegen size. The symbols are longer than before, the the amount
> of them is roughly the same, so there's no longer an explosion
> in their amount.
> Relops are the last bit in these fixes, I'll fix them during the weekend.
Here. This does produce 17 symbols instead of 9 for a test with a
single operator== comparison.
But it's not 47 like it is with the code before this patch.
2019-04-01 Ville Voutilainen <email@example.com>
Use single-visitation in variant assignment and swap.
Also use indices instead of types when checking whether
variants hold the same thing.
* include/std/variant (__do_visit): Add a template parameter
for index visitation, invoke with indices if index visitation
(_Copy_assign_base::operator=): Do single-visitation with
an index visitor.
(__visit_invoke): Call with indices if it's an index visitor.
(relops): Do single-visitation with an index visitor.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 11070 bytes
Desc: not available
More information about the Gcc-patches