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

            Bug ID: 123612
           Summary: [reflection] code with extern local array rejected
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

I'm not 100% sure but this should probably be accepted:

```
#include <meta>

extern int a[];

consteval auto
f ()
{
  extern int a[3];
  auto ret = ^^a;
  static_assert(std::is_same_v<decltype(a),decltype([:ret:])>);
  return ret;
}
static_assert(std::is_same_v<decltype(a),decltype([:f():])>);
```

Reply via email to