On Sun, Sep 2, 2012 at 8:46 PM, Peter Alexander
<peter.alexander...@gmail.com> wrote:
> On Sunday, 2 September 2012 at 18:23:48 UTC, Simen Kjaeraas wrote:
>>
>> void myAssert(int line = __LINE__, string file = __FILE__, Args...)(lazy
>> bool condition, lazy Args args) {
>>     if (!condition)
>>     {
>>         writefln("Assertion failed @ %s:%d", file, line);
>>         writefln(args);
>>         exit(1);
>>     }
>> }
>
>
> Nice. I thought of that, but for some reason I thought that you couldn't
> have default args before variadic args.
>

IIRC, you can even have them before standard template args. Template
arguments are much more versatile (or hard-working) than function
arguments.

Reply via email to