https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104041
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- 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. Can you use either do the following instead: template <typename T> struct C { C(T) = delete; }; Which requires a specialization for C<T>::C<T> so it will not be a deleted constructor.