How std::any Works
▻https://www.fluentcpp.com/2021/02/05/how-stdany-works
In the previous post we’ve seen a very nice technique to use value semantics with inheritance and virtual methods, which was made possible by std::any. Given its usefulness, it would be interesting to better understand std::any. Indeed, std::any is sometimes said to be “the modern void*“. But it does much more than a void*. A […]