https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97420
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2020-10-14 Keywords| |rejects-valid Ever confirmed|0 |1 --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- Reduced: int isspace (int) noexcept; template<int (& F)(int)> void A() { } auto p = A<isspace>; The problem is that the NTTP reference cannot bind to a noexcept function. It works with a reference to a noexcept function: template<int (& F)(int) noexcept> void A() { } It only fails for C++17 and later because the noexcept isn't part of the type before that. I think we can consider this a regression, since the same code compiles in C++14 and with previous versions of GCC.