Migration from boost::any
The lesson shows how transition from boost to std can make things more flexible for you.
We'll cover the following...
Boost Any was introduced around the year 2001 (Version 1.23.0). Interestingly, the author of the boost library - Kevlin Henney - is also the author of the proposal for std::any
. So the two types are strongly connected, and the STL version is heavily based on the predecessor.
Here are the main changes:
Feature | Boost.Any (1.67.0) | std::any |
---|---|---|
Extra memory allocation | Yes | Yes |
Small buffer optimisation | Yes | Yes |
emplace | No | Yes |