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().


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -