Capturing __FILE__ and __LINE in a variadic templated function
Nordlöw via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Nov 2 00:23:13 PST 2015
On Sunday, 1 November 2015 at 23:36:15 UTC, anonymous wrote:
> On 01.11.2015 23:49, Adam D. Ruppe wrote:
>> Yeah, just make the other args normal runtime instead of
>> template:
>
> Or make it two nested templates:
>
> template show(T...)
> {
> void show(string file = __FILE__, uint line = __LINE__,
> string fun = __FUNCTION__)()
> {
> ...
> }
> }
Doesn't work.
I need `T` to be an alias in order for .stringof to work.
How do I specify a variadic template argument alias list of
aliases?
More information about the Digitalmars-d-learn
mailing list