Consider this:
template
struct hash
{
static_assert(false,\"Not implemented.\");
};
struct unhashable {};
template
On gcc 4.7, compilation fails. I am pretty positive though that this will compile ok in gcc 4.8 (but cannot check at this very moment). Who is right?
The condition in your static assertion does not depend on any template parameter. Therefore, the compiler can immediately evaluate it to false when parsing the template, and realize that the assertion should fire - no matter whether you actually instantiate the template anywhere else.
The same should be true on any compiler.