Instantiate!(Template, args) in Phobos?

Nick Treleaven via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Apr 22 07:48:00 PDT 2016


On 22/04/2016 14:40, Steven Schveighoffer wrote:
> OK, I get it. I think this used to work, but I think D has long since
> disallowed direct access to eponymous members.
>
> So what you really want to do is:
>
> staticEx!(Exception, msg)!(file, line), but of course this doesn't
> follow proper grammar.
>
> I think you are right, this cannot be done without such a template. It
> brings back access to the eponymous nested template, interesting. I
> think we should add it.

OK, great :-)


More information about the Digitalmars-d-learn mailing list