I've been thinking of creating some callbacks by interface inheritance. The question is, should I take, say, a shared_ptr, a unique_ptr, or a raw pointer? I don't want to define the memory management of the derived class because, well, they should have their own undefined memory ma开发者_开发问答nagement.
std::function
?
Your use sounds like exactly what std::function (well boost::function) is perfect for.
精彩评论