Signals and fuction documentation really old?
..or am I having a day of profound stupidity. documentation: Boost.Function 3.5 Comparing Boost.Function objects me: okay, boost function object wrapper objects are comparable. documentation: Chapter 5 FAQ 5.1 Comparison between boost::function objects cannot be implemented well, and therefore will not be implemented. me:okay so it is not implemented documentation: 5.1 This essentially negates the usefulness of operator==in the context in which it is most desired:multitarget callbacks. me: great, multitarget callbacks is exactly why I am reading all this documentation documentation: 5.1 The Signals library has a way around this. me: great, if I only had an example of that way that wouldn't contain 2 free functions declared in the same file as the signal itself. Any help in clearing up my confusion greatly appreciated Tony
On Feb 6, 2005, at 12:38 PM, Tony Juricic wrote:
..or am I having a day of profound stupidity.
documentation: Boost.Function 3.5 Comparing Boost.Function objects
me: okay, boost function object wrapper objects are comparable.
Well, almost. You can compare a Boost.Function object against anything it can possibly target, e.g., a function object. Perhaps this section needs a different title.
documentation: Chapter 5 FAQ 5.1 Comparison between boost::function objects cannot be implemented well, and therefore will not be implemented.
me:okay so it is not implemented documentation: 5.1 This essentially negates the usefulness of operator==in the context in which it is most desired:multitarget callbacks.
me: great, multitarget callbacks is exactly why I am reading all this documentation
documentation:
Hmmm, this shouldn't definitely clarify that we have some support for operator==, just not exactly what most people expect.
5.1 The Signals library has a way around this.
me: great, if I only had an example of that way that wouldn't contain 2 free functions declared in the same file as the signal itself.
Any help in clearing up my confusion greatly appreciated
The signals library returns a "connection" object that represents the
signal-slot connection. So, you can't just name a function object again
to remove it, you need to hold on to the connection object.
There is an alternative to using connection objects: make your
"disconnect" function a template. For instance, say we have:
std::list
participants (2)
-
Douglas Gregor
-
Tony Juricic