Michel Fortin: > Am I right that what you want is this? > static assert(!__traits(compiles, foo(10)));
I want a nice syntax that statically asserts if foo(10) doesn't statically asserts :-) What you have written is close (in D1 I have used the is() syntax for a similar purpose), but beside being syntactically ugly, it doesn't specifically detect static asserts inside foo. Bye, bearophile