Is there a way to use Object.factory with templated classes? Or some way to construct templated classes given RTTI of an instance?

Chad Joan chadjoan at gmail.com
Thu Sep 27 18:44:27 UTC 2018


On Thursday, 27 September 2018 at 18:37:27 UTC, Chad Joan wrote:
>
> I will probably end up going with the latter suggestion and 
> have Extended use the Root's T.  That would probably make sense 
> for what I'm doing.  In my case, the T allows the caller to 
> configure what kind of output the thing provides... IIRC (it's 
> been a while since I touched this code o.O).
>
> Thanks for pointing that out.

Wait, actually the T is the element type of the input range, like 
"char" if the parser is to parse UTF8 strings.  I'd already 
figured that out too.  (*゚ー゚)ゞ


More information about the Digitalmars-d-learn mailing list