大家讲道理2017-04-17 11:48:30
You just use std::function to wrap it up. As long as the call signatures of these anonymous functions, functors, function pointers and the like are the same, you can use std::function to save them and put them in a container. .
阿神2017-04-17 11:48:30
Use Boost.Any, a generic container
http://www.boost.org/doc/libs/1_57_0/doc/html/any.html