> In there I read:
>>
>> Concerned about variant proposals resorting to RTTI. RTTI is verboten for
>> game developers and dynamic dispatch is not ideal, so this variant would be
>> a write-off.
>
>
> What in the variant proposal n4450 resorts to RTTI?
That concern may have been from me. The sample implementation I'd seen
from CPPCon presenters did the same thing that Boost.Variant does,
which uses type_info as the discriminator internally, and exposed that
detail inadvertently.
It looks like the N4450's "exposition only" sample interface is using
the type-to-int trick instead, which is good.
I talked to some authors at last CPPCon, so perhaps they took the
advice to heart? Or I'm just remembering a different implementation
(there were two or three different talks on or involving discriminated
unions at CPPCon, iirc, not all of which turned into papers).