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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org

--- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> ---
The standard quite clearly says that this code is ill-formed, no diagnostic
required.

14.6/8: "If a hypothetical instantiation of a template immediately following
its definition would be ill-formed due to a construct that does not depend on a
template parameter, the program is ill-formed; no diagnostic is required.  If
the interpretation of such a construct in the hypothetical instantiation is
different from the interpretation of the corresponding construct in any actual
instantiation of the template, the program is ill-formed; no diagnostic is
required. [ Note: This can happen in situations including the following:
* a type used in a non-dependent name is incomplete at the point at which a
template is defined but is complete at the point at which an instantiation is
performed, ...."

Reply via email to