On Thursday, February 10, 2011 16:12:01 Tomek Sowiński wrote:
> Is there a way to statically assert compilation of an expression failed
> *with a certain message*? I want to check my static asserts trip when they
> should.

You mean like

static assert(0, "We have a failure, Captain!");

If a static assert fails, it's obvious. Compilation fails. Now, if you're 
trying 
to assert something like that a particular template instantiation fails, the 
use 
static assert(!__traits(compiles, exp)); where exp is the expression being 
tested.

- Jonathan M Davis

Reply via email to