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
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