Dear ev developers,

I am suggesting the attached patch to be applied, as the following short code does not compile:

--- code
#include <ev++.h>
#include <iostream>

class A {
        public:
                void cb(int x) {
                        std::cerr << "A::cb()" << std::endl;
                }
};

int main()
{
        ev::dynamic_loop l;
        A a;

        l.once<A, &A::cb>(-1, 0, 0, &a);

        l.loop();

        return 0;
}
--- code

I am using the version included in debian squeeze:
$ dpkg -l|grep -i libev-dev
ii libev-dev 1:3.9-1 static library, header files, and docs for libev

Regards,
Kojedzinszky Richard
--- usr/include/ev++.h	2010-03-09 23:23:40.000000000 +0100
+++ /usr/include/ev++.h	2011-04-15 10:06:44.096326110 +0200
@@ -272,7 +272,7 @@
     template<class K, void (K::*method)(int)>
     static void method_thunk (int revents, void *arg)
     {
-      static_cast<K *>(arg)->*method
+      (static_cast<K *>(arg)->*method)
         (revents);
     }
 
@@ -286,7 +286,7 @@
     template<class K, void (K::*method)()>
     static void method_noargs_thunk (int revents, void *arg)
     {
-      static_cast<K *>(arg)->*method
+      (static_cast<K *>(arg)->*method)
         ();
     }
 
@@ -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)
         ();
     }
 
_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev

Reply via email to