prog.cpp: In function ‘int main()’:
prog.cpp:13:12: error: no matching function for call to ‘A::fun()’
A::fun<C>();
^
prog.cpp:13:12: note: candidate is:
prog.cpp:4:15: note: template<class T> static typename T::type A::fun()
static auto fun() -> typename T::type { }
^
prog.cpp:4:15: note: template argument deduction/substitution failed:
prog.cpp: In substitution of ‘template<class T> static typename T::type A::fun() [with T = C]’:
prog.cpp:13:12: required from here
prog.cpp:4:15: error: no type named ‘type’ in ‘struct C’