是否有某些情况下 boost::function 不能被 std::function 替换?
Are there some circumstances that boost::function could not be replaced by std::function?
是否有某些情况下 boost::function
无法被 std::function
替代?
如果能举个简单的例子就更好了
If you work in a development environment supporting C++11, you have access to the class std::function
from the header file <functional>
. In this case you can ignore Boost.Function because boost::function
and std::function
are equivalent.
但这可能取决于 boost 的版本,参见 history。
是否有某些情况下 boost::function
无法被 std::function
替代?
如果能举个简单的例子就更好了
If you work in a development environment supporting C++11, you have access to the class
std::function
from the header file<functional>
. In this case you can ignore Boost.Function becauseboost::function
andstd::function
are equivalent.
但这可能取决于 boost 的版本,参见 history。