Search code examples
c++boost

Are there some circumstances that boost::function could not be replaced by std::function?


Are there some circumstances that boost::function could not be replaced by std::function?

It would be better if you could give some simple examples.


Solution

  • From theboostcpplibraries.com:

    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.

    But it might depends of version of boost, see history.