experimental implementation of function<R (Args...)> in C++11 with boost::shared_ptr
try another implementation using intrusive_ptr+atomic instead of shared_ptr to avoid overhead