[Bug c++/123660] [reflection] Cannot make a pointer to member from a reflection of a type template argument

boris.staletic at protonmail dot com gcc-bugzilla@gcc.gnu.org
Thu Jan 29 10:48:42 GMT 2026


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

--- Comment #1 from Boris Staletic <boris.staletic at protonmail dot com> ---
Ran into this again, in this pull request:
https://codeberg.org/bstaletic/pymetabind/pulls/1

Reduced test case:

```
#include <meta>

struct s {
    int x;
};

void f(int s::*);

template <std::meta::info class_memb>
auto bind_data_member() {
    f(&[:class_memb:]);
}

int main() {
    bind_data_member<^^s::x>();
}
```


More information about the Gcc-bugs mailing list