[Bug c++/126599] [reflection] display_string_of(nullptr-pointer-to-data-member) is "-1"

"ivan.lazaric.gcc at gmail dot com via Gcc-bugs" <[email protected]> Mon, 03 Aug 2026 12:45:09 +0000
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D126599

--- Comment #1 from Ivan Lazaric <ivan.lazaric.gcc at gmail dot com> ---
This might be more general actually
No reflection example:
```cpp
struct S;

template<auto M>
requires (M !=3D nullptr)
void fn();

void use() {
    fn<(int S::*)nullptr>();
}
```

Compiler output:
```
<source>:8:26: error: no matching function for call to 'fn<-1>()'
```

Godbolt: https://godbolt.org/z/xdd34jsWr=