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

            Bug ID: 123825
           Summary: std::meta::has_identifier issue
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

The last static assert from
https://eel.is/c++draft/meta.reflection#names-example-1 failed.

Noted, this example comes from Function Parameter Reflection (P3096R12)
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3096r12.pdf, and I
saw in the commit message
https://github.com/gcc-mirror/gcc/commit/4b0e94b394fa38cdc3431f3cfb333b85373bd948
saying that this paper has also been implemented. So I'm not sure if I've
missed something.


void fun(int);
constexpr std::meta::info r = parameters_of(^^fun)[0];
static_assert(!has_identifier(r));

void fun(int x);
static_assert(has_identifier(r));

void fun(int x);
static_assert(has_identifier(r));

void poison() {
  void fun(int y);
}
static_assert(!has_identifier(r));

https://godbolt.org/z/zcoqn5Ycz

Reply via email to