Christopher Smith on 30 Jul 2003 00:00:10 -0000 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [ALACPP] boost::function shortcoming |
We talked about this at our last meeting didn't we? Oh wait, you weren't there..... ;-) On Tue, 2003-07-29 at 16:39, Gavin Doughtie wrote: > So, I was wondering if there was a way to compare two boost::function > objects to see if they were bound to the same function. Greg, quite > sensibly, wanted a unit test to ensure that the default bindings were > correct, and there was no way that we could find to dig the original > function pointer out and check it. Of course another approach is to make a dummy function that just toggles a flag if it is called, and then test if boost::function invokes that function. > Fortunately, in this case we were able to use a raw function pointer, but > it begs the question -- I could see not comparing two boost::bound > function objects as the member instances might be different, but even then > I'd like to do some kind of type checking. Given that operator== is deliberately left undefined, and the way they are doing their abstraction, I can't see a way to do what you want. -- Christopher Smith <x@xxxxxxxx> _______________________________________________ alacpp mailing list alacpp@xxxxxxxxxxx http://lists.ellipsis.cx/mailman/listinfo/alacpp