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

            Bug ID: 125808
           Summary: Error on std::meta::current_class() in function
                    parameters in local class
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eczbek.void at gmail dot com
  Target Milestone: ---

https://godbolt.org/z/fY41nK58o
```
struct A {
        // fine
        void f([:std::meta::current_class():]) {}
};

int main() {
        struct B {
                // error
                void f([:std::meta::current_class():]) {}
        };
}
```

```
<source>: In function 'int main()':
<source>:11:52: error: uncaught exception of type 'std::meta::exception';
'what()': 'current scope does not represent a class nor a member function'
   11 |                 void f([:std::meta::current_class():]) {}
      |                                                    ^~
<source>:11:52: error: expected a reflection of a type
<source>:11:54: error: expected identifier before ')' token
   11 |                 void f([:std::meta::current_class():]) {}
      |                                                      ^
```

Reply via email to