
On 27 April 2010 20:55, Michael Caisse
Piotr -
I don't think this is "unexpected behavior" to most. You have *not* bound abc. You have bound a pointer. What that pointer points to may change and when you use the pointer it may very well point to something different than at the time of the bind.
This isn't "unexpected". Your bind is to a pointer. You need to either ensure that the value pointed at doesn't change or you can pass an object containing the data itself.
I've called it "unexpected", because f1() and f2() in code below
behaves differently:
void echo1(const char* c) {
cout << c << '\n';
}
void echo2(const string& s) {
cout << s << '\n';
}
int main() {
boost::function
michael
--
---------------------------------- Michael Caisse Object Modeling Designs www.objectmodelingdesigns.com
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Piotr Jachowicz