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

            Bug ID: 96309
           Summary: Substitution failure doesn't propagate through the
                    typename of a template value parameter
           Product: gcc
           Version: 9.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: 171044 at vutbr dot cz
  Target Milestone: ---

Created attachment 48923
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48923&action=edit
Source code

When a substitution failure takes place in the default of a template type
parameter (as presented in the namespace conformant), everything works as
expected - the candidate is dismissed and the instantiation fails.

However, when the substitution failure takes place in the typename of a
template value parameter (as presented in the namespace defective), it behaves
in a non-standard manner - the candidate isn't dismissed and the instantiation
doesn't fail.

The enclosed source code compiles even though it shouldn't.

https://godbolt.org/z/Gs6e85

Reply via email to