https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124447
Bug ID: 124447
Summary: [reflection] Unable to use reflection in the using
statement
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: uchanahome8 at gmail dot com
Target Milestone: ---
Hi, during my experimentation with reflection, I stumbled upon the following
issue in gcc trunk (and reproducible on compiler explorer):
```
#include <meta>
using MyType = [:sizeof(int)<sizeof(long)? ^^long : ^^int:];
int main() {
}
```
On gcc (trunk), it fails to compile with (https://godbolt.org/z/G3heGEeqa):
```
<source>:3:16: error: expected type-specifier before '[' token
3 | using MyType = [:sizeof(int)<sizeof(long)? ^^long : ^^int:];
| ^
Compiler returned: 1
```
On clang, it works: https://godbolt.org/z/rzP65b7ev