Boost logo

Boost Users :

From: Cory Nelson (phrosty_at_[hidden])
Date: 2008-03-06 05:18:04


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<void()> f;

void func2();

void func1() {
   f = func2;
}

void main() {
  f = func1;
  f();
}

-- Cory


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net