On Tue, 11 May 2010 16:06:31 -0400, Steven Schveighoffer <schvei...@yahoo.com> wrote:

The ugly solution is to use static if like so:

static if(isIntegral!V)
{
    unittest
    {
    }
}

But that is, well, ugly.

I found a less ugly solution -- remove the braces:

static if(isIntegral!V) unittest
{
   ...
}

This is probably fine for most purposes.

I'd still like the non-generic unit test near the function declaration.

-Steve

Reply via email to