Instantiate!(Template, args) in Phobos?
Nick Treleaven via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Apr 22 03:50:57 PDT 2016
On 21/04/2016 18:03, Steven Schveighoffer wrote:
> This doesn't work?
>
> alias staticEx(string msg, string file = __FILE__, size_t line =
> __LINE__) = staticEx!(Exception, msg).staticEx!(file, line);
No, nor using the module dot prefix `= .staticEx!(...).staticEx` either:
staticex.d(3): Error: template identifier 'staticEx' is not a member of
template 'staticex.staticEx!(Exception, "Look ma, @nogc
exception!").staticEx(string file = __FILE__, uint line = __LINE__)()'
staticex.d(20): Error: template instance staticex.staticEx!("Look ma,
@nogc exception!", "staticex.d", 20u) error instantiating
> I would think something with AliasSeq could come in handy, it's the way
> to alias a compile-time list.
Not sure how that would help.
More information about the Digitalmars-d-learn
mailing list