When should I use std::any
When to Use void* as an extremely unsafe pattern with some limited use cases, std::any adds type-safety, and that’s why it has some real use cases. Some possibilities: In Libraries – when a library type has to hold or pass anything without knowing the set of available types. Parsing files – if you really cannot … Read more