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

--- Comment #4 from Ivan Lazaric <ivan.lazaric.gcc at gmail dot com> ---
Noting an example of similar nature (haven't run it over your patch):
```cpp
struct S { int s, t; };
struct T : S {};
template <auto M>
void foo (int);
void
bar ()
{
  foo <(int T::*)&T::s> ();
  foo <(int T::*)&T::t> ();
}
```

```
<source>:8:25: error: no matching function for call to 'foo<((0 == -1) ? ((long
int)0) : (((long int)0) + 0))>()'
<source>:9:25: error: no matching function for call to 'foo<((4 == -1) ? ((long
int)4) : (((long int)4) + 0))>()'
```

https://godbolt.org/z/EWTedKsEh

Might be more appropriate to spin it off into a separate issue though

Reply via email to