c++ - Difference in template arguments C<void ()> and C<void (*)()> -
i don't understand difference between template arguments
template <class t> class c { t t; }; void foo() { c<void ()> c1; //isn't compiled c<void (*)()> c2; }
what type void ()? such kind of types used in boost::function..
void()
function type. void(*)()
pointer type. in c++ cannot have variables of function type, t t;
doesn't compile when t
void()
.