Re: Scope & Structs

2024-10-19 Thread Salih Dincer via Digitalmars-d-learn
On Friday, 18 October 2024 at 07:43:47 UTC, Richard (Rikki) Andrew Cattermole wrote: Sorry for not replying sooner, COVID has not been a fun virus for my mind to have. When a variable is declared with a struct that needs cleanup, it effectively rewrites the following statements into a try f

List classes at compile time

2024-10-19 Thread Noé Falzon via Digitalmars-d-learn
tl;dr: is it possible to iterate over all classes in a program at compile time (or possibly all derived classes from a given base class) to use in a mixin? Longer version: Hi! I'm essentially trying to select which class to instantiate/use as template argument based on a runtime string (user

Re: List classes at compile time

2024-10-19 Thread evilrat via Digitalmars-d-learn
On Saturday, 19 October 2024 at 08:51:20 UTC, Noé Falzon wrote: tl;dr: is it possible to iterate over all classes in a program at compile time (or possibly all derived classes from a given base class) to use in a mixin? No, parent class can not possibly know who extends it, just think about