#include <any> #include <vector> #include <map> int main() { // std::vector auto a = std::vector<std::any>{ -1, 8.5, "Hoge" }; std::cout << std::any_cast<const char*>(a[2]) << std::endl; // std::map auto b = std::map<std::string, std::any>{ { "a", -1 }, { "b", 8.5 }, { "c", "Hoge" }, };