Re: get vtable size

2017-05-08 Thread Basile B. via Digitalmars-d-learn
On Sunday, 7 May 2017 at 04:01:43 UTC, Mike B Johnson wrote: how many elements(virtual functions) are in the __vptr? You don't need the size. The index you get with __traits(virtualIndex) is always valid. (https://dlang.org/spec/traits.html#getVirtualIndex) However as an exercise you can st

Re: get vtable size

2017-05-08 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-05-07 06:01, Mike B Johnson wrote: how many elements(virtual functions) are in the __vptr? I guess you can use __traits(allMembers) and __traits(isVirtualMethod) [1]. [1] http://dlang.org/spec/traits.html -- /Jacob Carlborg