I've been digging through cppreference, but I cannot figure out why the code below does not compile. Can anybody enlighten me?
template<typename T, T a> void g();
typedef void(*Func)();
Func f;
template<typename T>
constexpr Func get(T a)
{
return g<T, a>;
}
void set()
{
f = get(1);
}
I'm compiling with something like
g++ -c -Wall -Werror -std=gnu++11