Syntax error in ev++.h header file. Reproducible: Always Steps to Reproduce: 1. test.cpp: #include <ev++.h> struct Service { Service() { ev::async async_wipe; async_wipe.set< Service, &Service::wipe_cb >( this ); } void wipe_cb () {} }; int main() { Service service; return 0; } 2. g++ test.cpp Actual Results: /usr/include/ev++.h: In static member function ‘static void ev::base<ev_watcher, watcher>::method_noargs_thunk(ev_loop*, ev_watcher*, int) [with K = Service, void (K::* method)() = &Service::wipe_cb, ev_watcher = ev_async, watcher = ev::async]’: /usr/include/ev++.h:477: instantiated from ‘void ev::base<ev_watcher, watcher>::set(K*) [with K = Service, void (K::* method)() = &Service::wipe_cb, ev_watcher = ev_async, watcher = ev::async]’ test.cpp:8: instantiated from here /usr/include/ev++.h:483: error: must use ‘.*’ or ‘->*’ to call pointer-to-member function in ‘&Service::wipe_cb (...)’ --- /usr/include/ev++.h 2010-06-24 22:37:11.805477983 +0400 +++ fix 2010-06-24 22:41:03.533478532 +0400 @@ -480,7 +480,7 @@ template<class K, void (K::*method)()> static void method_noargs_thunk (EV_P_ ev_watcher *w, int revents) { - static_cast<K *>(w->data)->*method + (static_cast<K *>(w->data)->*method) (); }
fixed by upstream. http://cvs.schmorp.de/libev/ev%2B%2B.h?r1=1.49&r2=1.50 3.90-r2 in cvs now.