2

Can anyone explain why define type(both of typedef and using) can only for header, but can't use for implement?

using myfunc = void();

myfunc test; //this will be okay
myfunc test {} //this is wrong

P.S. GCC said error: function ‘void test()’ is initialized like a variable for myfunc test {}

0 Answers0