[Bug c++/92593] [10 Regression] ICE with CTAD using undeclared constraint

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Nov 20 10:41:00 GMT 2019


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |needs-bisection
      Known to work|                            |9.2.1
            Summary|ICE with CTAD using         |[10 Regression] ICE with
                   |undeclared constraint       |CTAD using undeclared
                   |                            |constraint
      Known to fail|                            |10.0

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
With GCC 9 and -std=gnu++2a -fconcepts there's no ICE:

ice.cc:1:10: error: 'integral' has not been declared
    1 | template<integral T>  // oops, should be std::integral
      |          ^~~~~~~~
ice.cc:4:11: warning: unnecessary parentheses in declaration of 'T'
[-Wparentheses]
    4 |   ref_view(T) { }
      |           ^
ice.cc:4:17: error: expected ';' at end of member declaration
    4 |   ref_view(T) { }
      |                 ^
      |                  ;
ice.cc:7:13: error: class template argument deduction failed:
    7 | ref_view r{1};
      |             ^
ice.cc:7:13: error: no matching function for call to 'ref_view(int)'
ice.cc:2:8: note: candidate: 'template<<declaration error> >
ref_view(ref_view<<declaration error> >)-> ref_view<<declaration error> >'
    2 | struct ref_view
      |        ^~~~~~~~
ice.cc:2:8: note:   template argument deduction/substitution failed:


More information about the Gcc-bugs mailing list