
14 Mar
2008
14 Mar
'08
1:37 p.m.
On Mar 6, 2008, at 5:18 AM, Cory Nelson wrote:
Hi guys, ran across a question that I'd have thought would be at least common enough to get a note in the docs, but I can't find it there.
Is it safe to set a function from within a call on the function?
boost::function
f; void func2();
void func1() { f = func2; }
void main() { f = func1; f(); }
As long as the function object being called by the boost::function doesn't mind having its state disappear, it's fine. - Doug