https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116646
--- Comment #4 from Craig Schroeder ---
Thank you for taking the time to explain this. I understand why the code
snippet does not work now.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116646
--- Comment #3 from Jonathan Wakely ---
(In reply to Andrew Pinski from comment #1)
> I think since it is not dependent, it gets resolved right away.
Right. A discarded statement (i.e. an untaken if-constexpr branch) is not
instantiated in a te
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116646
Andrew Pinski changed:
What|Removed |Added
Resolution|--- |INVALID
Status|UNCONFIRMED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116646
--- Comment #1 from Andrew Pinski ---
It works when y is dependent though:
```
template
void f() {
if constexpr(y<0)
{
static_assert(y<0);
}
}
auto t = &f<0>;
```
I think since it is not dependent, it ge