0

I'm studing std::any costruct of the standard library of c++17 standard. But really i don't understand which are the the usecases in which is useful to use std::any instead of std::variant or any other costruct like template or a simple void* variable.

Someone can help me figure out these usecases?

Zig Razor
  • 3,381
  • 2
  • 15
  • 35
  • https://www.geeksforgeeks.org/stdany-class-in-c/ some example mentioned here – Build Succeeded Dec 18 '19 at 18:09
  • [Boost.Program_options](https://www.boost.org/doc/libs/1_72_0/doc/html/program_options.html) uses something like a `std::map` to store the programs input. – sv90 Dec 20 '19 at 12:15

0 Answers0