https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116646
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- It works when y is dependent though: ``` template<int y> void f() { if constexpr(y<0) { static_assert(y<0); } } auto t = &f<0>; ``` I think since it is not dependent, it gets resolved right away.