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

            Bug ID: 120271
           Summary: typename T not allowed in sizeof
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tymi at tymi dot org
  Target Milestone: ---

https://godbolt.org/z/3546Y6TTe

```cpp
int main()
{
    using T = int;

    return sizeof(typename T);
}
```
Will say "expected nested-name-specifier", but the correct grammar is
sizeof(type-id) [which accepts type-specifier-seq which accepts
typename-specifier]

Reply via email to