Hello Andreas, On 09/29/2011 11:55 PM, Andreas Halm wrote: > I was trying to use > void FieldContainer::subChangedFunctor(FunctorT func) > and since I ran into compilation problems I did a little research and it > turns out that > bool operator == for boost::function objects is not, and will not be > supported. > See: http://www.boost.org/doc/libs/1_47_0/doc/html/function/faq.html
true, once the conversion to boost::function has happened there is not enough type information left to do the comparison. However, the return value from a boost::bind() (before being converted to boost::function) has enough information, so internally we use that to remove functors, e.g. from OSGVisitSubTree.cpp: value->addChangedFunctor( boost::bind(&VisitSubTree::rootChanged, this, _1, _2, _3), ""); value->subChangedFunctor( boost::bind(&VisitSubTree::rootChanged, this, _1, _2, _3)); > So I guess I will need to use the string version ... encoding the pointers > to an object and one of its member function into the string should be enough > to uniquely identify right? yes, if you are worried about two objects being allocated to the same memory location (at different points in time of course) you could add the container id as well. Cheers, Carsten ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2 _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users