static constexpr pointer-to-function, difference between compilers
问题 When answering this question, I tried the following code with gcc (code compiled) and clang (code rejected): typedef long (*func)(int); long function(int) { return 42; } struct Test { static constexpr func f = &function; }; template<func c> struct Call { static void f() { c(0); } }; int main() { Call<Test::f>::f(); } I am not sure which compiler is right, although I think the constexpr initialization of Test::f is ok. The error clang outputs is: error: non-type template argument for template