Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 325391 - dev-libs/libev-3.80-r1: compilation error in ev++.h
Summary: dev-libs/libev-3.80-r1: compilation error in ev++.h
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All All
: High major (vote)
Assignee: MATSUU Takuto (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-24 18:43 UTC by Vasiliy Yeremeyev
Modified: 2010-07-03 16:55 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vasiliy Yeremeyev 2010-06-24 18:43:43 UTC
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)
         ();
     }
Comment 1 MATSUU Takuto (RETIRED) gentoo-dev 2010-07-03 16:55:48 UTC
fixed by upstream.
http://cvs.schmorp.de/libev/ev%2B%2B.h?r1=1.49&r2=1.50

3.90-r2 in cvs now.