[Bug c++/89741] [9 Regression] static_assert fires when template not instantiated

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Mar 18 15:52:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89741

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |INVALID

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
There are indeed no explicit specializations (nor partial specializations) but
IMHO the above mentioned sentence talks about all specializations, including
the implicit specializations.
Just read the two sentences before that, those say:
"Knowing which names are type names allows the syntax of every template
definition to be checked. No diagnostic shall be issued for a template
definition for which a valid specialization can be generated."
The example at the end of that paragraph also shows a couple of cases when
issues in a template may be diagnosed even when it is not instantiated and when
the diagnostics must be deferred until instantiation.


More information about the Gcc-bugs mailing list