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

            Bug ID: 101733
           Summary: simple-requirement prefixed with typename interpreted
                    as type-requirement
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: johelegp at gmail dot com
                CC: johelegp at gmail dot com
  Target Milestone: ---

See https://godbolt.org/z/q67Mserar.
```C++
template<class T>
concept C = requires {
  typename T::x();
  typename T::x() + 1;
  1 + typename T::x();
};
```
```
<source>:3:16: error: expected ';' before '(' token
    3 |   typename T::x();
      |                ^
      |                ;
<source>:4:16: error: expected ';' before '(' token
    4 |   typename T::x() + 1;
      |                ^
      |                ;
Compiler returned: 1
```

Reply via email to