https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104041
bugzilla at cems dot de changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|INVALID |FIXED --- Comment #2 from bugzilla at cems dot de --- (In reply to Andrew Pinski from comment #1) > Since the value that is done in the static_assert is not value dependent, it > is rejected at the definition time of C<T>::C<T>. > > This is correct. So if I replace the condition in the static_assert by something which is value dependent,it will not be triggered in an unselected specialization even if the condition is always false, e.g.: static_assert(sizeof(T) < 0, "C<T> selected"); OK, thanks.