[Issue 21143] vtbl not accessible without typeid
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Aug 10 21:13:58 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=21143
Walter Bright <bugzilla at digitalmars.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugzilla at digitalmars.com
--- Comment #1 from Walter Bright <bugzilla at digitalmars.com> ---
It's actually not a __trait, is a pseudo-member:
class C { ... }
void test(C c)
{
c.vptr // not the vtbl[] for C, but for the derived class that c is
}
What I can do is make:
C.vptr give a pointer to the vtbl for class C
I don't think your use actually needs to know the number of entries in it?
--
More information about the Digitalmars-d-bugs
mailing list