Have a template function register(T)() instantiated and executed at startup for all sub classes of a specific base class?
monkyyy
crazymonkyyy at gmail.com
Wed Sep 24 23:41:32 UTC 2025
On Wednesday, 24 September 2025 at 23:29:31 UTC, TwoOfCups wrote:
> On Sunday, 21 September 2025 at 19:23:33 UTC, monkyyy wrote:
>> On Sunday, 21 September 2025 at 08:52:48 UTC, TwoOfCups wrote:
>>> Primarily it is this that I am curious if there is **ANY**
>>> way to make happen.
>>
>> how far into compiler bugs you wanta go?
>
> If there was even a hacky compiler bug way of making it work I
> would still be interested in how it could be done just for
> learning purposes.
https://github.com/crazymonkyyy/blackmagic-in-d/blob/master/src/appendable.d
improving this is on my todo list but this is the sort of
direction id look
More information about the Digitalmars-d
mailing list