title: What causes std::bad_function_call?
body: <p>I've seen a <a href="https://stackoverflow.com/questions/4257683/stdbind-a-member-function-to-an-object-pointer">few</a> <a href="https://stackoverflow.com/questions/5556183/make-c-crash-without-casting/5557843#5557843">questions</a> that refer to the <a href="https://stackoverflow.com/questions/5543169/how-to-make-a-vector-of-functors-lambdas-or-closures-in-cox"><code>std::bad_function_call</code> exception</a>, but haven't been able to find out any by Googling about what causes this exception.</p>
  
  <p>What kind of behavior is supposed to cause this exception? Can you give me minimal examples that don't have other semantic problems also going on?</p>