In C++11, should the operation of static_assert within a template depend on whether that template has been instantiated or not? For example, with the following code
The C++0x draft (N3242) says in 14.6p8:
"If no valid specialization can be generated for a template definition, and that template is not instantiated, the template definition is ill-formed, no diagnostic required."
The same words appear in the C++03 standard.
In the case of the example from the question, no valid instantiation can be made for this template, so the quoted wording applies.
Since no diagnostic is required, the compiler may compile the program if the template is not instantiated. Of course, if it is instantiated then the program is ill-formed, with a diagnostic required.