Something like ADL from C++?

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Fri Dec 6 10:52:29 UTC 2024


On 06/12/2024 11:38 PM, Arafel wrote:
> On 6/12/24 11:18, Richard (Rikki) Andrew Cattermole wrote:
>> Yes, once you have a level in the hierarchy that adds a constructor, 
>> you basically lose the ability to call that constructor with the 
>> template this parameter.
> 
> Shared static constructors with a template this parameter would be the 
> solution (just promoting them in case somebody feels like implementing 
> them ;-) )

For deserialization sure.

For serialization they cannot be overridden.

In both cases you have to use a single global registration (which may 
not be a down side).

So another case of it works for somethings, but not others.



More information about the Digitalmars-d mailing list