I dont understand, I am just calling that function, and it simply does not
compile. Maybe, I want to signal error conditions through an fd, or such,
or why is that function there at all if not for such?
regards,
Kojedzinszky Richard
Euronet Magyarorszag Informatikai Zrt.
On Wed, 9 May 2012, Marc Lehmann wrote:
Date: Wed, 9 May 2012 17:56:23 +0200
From: Marc Lehmann <[email protected]>
To: Richard Kojedzinszky <[email protected]>
Cc: [email protected]
Subject: Re: ev++.h fix
On Tue, May 08, 2012 at 11:36:29PM +0200, Richard Kojedzinszky
<[email protected]> wrote:
I ran into a c++ compilation error, which came from ev++.h, in
feed_event(). It is a non-const funtion, but inside a static_cast is
made to const ev_watcher*, and with that the compiler dies with an
error.
Can you give an example of an error that is caused by some legal code? As
it looks, you use ev++.h in unsupported ways, which means you are on your
own.
--
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / [email protected]
-=====/_/_//_/\_,_/ /_/\_\
#include <iostream>
#include <ev++.h>
ev::io other;
void event_handler(ev::io &w_, int r)
{
std::string x ("<no data>");
if (r && ev::READ) {
std::cin >> x;
}
std::cerr << "Received event = " << r << "data=: " << x << std::endl;
w_.feed_event(ev::ERROR);
}
int main()
{
ev::dynamic_loop l;
ev::io w(l);
w.set(0, ev::READ);
w.set<event_handler>();
w.start();
l.loop();
}
_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev