W dniu 14.10.2011 23:14, Ben Stott pisze:

> Under VS, what (recent) feature of C/++ *does* work? ;-)
I'am not a user, but I read that lambdas works (but always as objects).

> If anything, it'll be easier to use std::function - and if it really
> needs to happen this is more likely the option that would be looked at,
> as it does not require the use of any extra external libraries.
But require TR1 or C++11 (or boost). But this is still good idea, 
because most compilers implements TR1 from longer time.

Also signal/slot libs. shouldn’t be a big problem... most are header 
only libraries, some signal/slot libs are 1 (or 2) header(s) file only.
Signal/slot libs gives one extra bonus: one than more call-back can be 
added at one time.

> The
> Callback typedef would only have to be modified to std::function<void
> (Widget*, void*)>, and everything should continue to work with the added
> bonus of lambdas now working, amongst other things.
Yes, probably it will work in most cases.

Probably it is better to finally have std::function<void(Widget*)>, or 
even std::function<void()>.
Still it is possible to write callback(old_callback_type, void*) method.

In all cases there is no way to get old_callback_type from 
std::function, so:
old_callback_type callback()
will be very hard to implement.

Regards,
Piotr

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to