On Wednesday, 30 August 2017 at 18:05:38 UTC, jmh530 wrote:
On Wednesday, 30 August 2017 at 17:24:55 UTC, Jean-Louis Leroy
wrote:
We had a discussion about automating the call to updateMethods
but I don't think that anybody thought of putting it in
registerMethods. It might work. I'll look into it. Thanks for
the suggestion...
Ali had suggested something similar[1]. I think your concern
was that it would get called multiple times, but shared static
module constructors runs once a program (static module
constructor runs once per thread).
[1] http://forum.dlang.org/post/[email protected]
Ah yes...So the problem is that registerMethods emits static
ctors that fill data structures representing the methods and the
specializations. They have to run - all of them - before
updateMethods. Thus, sadly Q's suggestion won't work.