Jon Stewart on 30 Jul 2003 00:12:38 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [ALACPP] boost::function shortcoming


> > 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.


Yeah. There's no good way with operator== (there are always bad ways...).

Frankly, Chris' suggestion to test the default bindings by invoking 
operator() is the right way to go. It's the superior test because it tests 
operator() -- what you care about -- and not operator==. Also, completely 
black box.



Jon
-- 
Jon Stewart
stew1@xxxxxxxxxxx
_______________________________________________
alacpp mailing list
alacpp@xxxxxxxxxxx
http://lists.ellipsis.cx/mailman/listinfo/alacpp