[v3 PATCH, RFC] Rewrite variant. Also PR libstdc++/85517

Ville Voutilainen ville.voutilainen@gmail.com
Wed Feb 6 10:21:00 GMT 2019


On Wed, 6 Feb 2019 at 12:13, Jonathan Wakely <jwakely@redhat.com> wrote:
> Did you compare the codegen?

No. Getting the metaprograms to work took all the time I had thus far. :)

> I think the assumption was this would produce smaller code. Does that
> hold true?

I think the assumption was that this produces equivalent or better
code than fixing the current
semantics bugs with some sort of separate constexpr arrays of function
pointers would.
And certainly better code than any approach that has a run-time
branch. I don't think this ends up
being different from the current codegen; both have an array indexing
operation followed by an indirect
function call.

> Are you still working on the rest of the special member functions? It

Yes.

> seems to me that they could be fixed separately anyway, it doesn't
> need to be done all at once. Each special member function is
> independent of the others.

Right. The question is whether we want to commit a mixture of
visitation and separate function pointer
arrays. :)



More information about the Libstdc++ mailing list