Trouble creating a formatted assert wrapper
Chris Nicholson-Sauls
ibisbasenji at gmail.com
Mon Sep 3 02:15:34 PDT 2012
On Sunday, 2 September 2012 at 23:40:01 UTC, Peter Alexander
wrote:
>
> Consider:
>
> myAssert(false, "%d", 1);
>
> What is Args? "%d", 1 could refer to the optional arguments, or
> the variadic arguments. Both match.
Easy: the variadic arguments are not, themselves, optional.
Match the variadic. This kind of problem is already solved in
every language with "scattering" assignments, and other such
features.
More information about the Digitalmars-d
mailing list