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

            Bug ID: 89743
           Summary: [concepts] ICE when using decltype(requires-expr) as
                    type template parameter
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jason.e.cobb at gmail dot com
  Target Milestone: ---

Example code:

template<typename T>
struct use_type {};

template<int = 0> // needed to fulfill requirement that requires appears only
in templates
using type = typename use_type<decltype(requires() {
        1;
})>;

Example compiler output:

<source>:7:3: internal compiler error: tree check: expected tree that contains
'typed' structure, have 'simple_req' in strip_typedefs_expr, at cp/tree.c:1855

    7 | })>;

On Compiler Explorer: https://godbolt.org/z/CsgSH7

Note: tested with both struct and templated alias-declaration, ICE occurs with
both.

Reply via email to