January 18, 2021 Re: CRTP + compile-time introspection + static ctors = WIN | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mathias LANG | On Sat, Jan 16, 2021 at 07:57:12AM +0000, Mathias LANG via Digitalmars-d wrote: > On Friday, 15 January 2021 at 18:31:18 UTC, H. S. Teoh wrote: > > > > And since static this() blocks are run at program startup and dynamic library load time, this ensures that after program startup, `classLoaders` has knowledge of all types the program will ever use. > > Just don't use separate compilation or you're in for a lot of > troubles. > https://issues.dlang.org/show_bug.cgi?id=20641 Hmm, interesting. Though in this case I'm not overly concerned since registering the same type multiple times is harmless. :-D T -- "Computer Science is no more about computers than astronomy is about telescopes." -- E.W. Dijkstra |
Copyright © 1999-2021 by the D Language Foundation