The process of integrating boost functionality into the standard library has become apparent over the years.
It seems though, that a useful & practical part of boost, that is containers that provide type erasure, has escaped this process.
Are there any particular reasons (performance penalty, lack of robustness) for this ?
Are there any proposals related to incorporating such functionality (eg boost::any) in the next Standard Library ?
shared_pointer uses type erasure, are there any other facilities in today's Standard Library where we can take advantage of this technique ?
Type erasure usually introduces an additional indirection and eventually virtual function calls which degrade performance.
There is a just recently updated working draft "C++ Extensions for Library Fundamentals" which proposes (among other features) boost::any for the standard.
std::function would be another example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With