Re: mixins

2021-11-21 Thread Alexey via Digitalmars-d-learn
On Wednesday, 17 November 2021 at 14:51:58 UTC, Abby wrote: Hello I would like to create validation mixin or mixin template which would return on error. Something like this: ``` mixin template Validate(a, b) { if(a > b) { writeln("invalid input"); return false; } }

Re: Null pointer in __vptr

2021-11-21 Thread frame via Digitalmars-d-learn
On Sunday, 21 November 2021 at 02:43:12 UTC, Ali Çehreli wrote: There are some offset arithmetic involved to get to the right vtbl pointer but the pointer of an object cannot be stored anywhere in the vtbl because there is just one vtbl but very many objects. Ok, so they mean by instance is