yang131

导航

2020年6月10日 #

c++ 17 demo

摘要: 1 // Cpp.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 2 // 3 4 #include <iostream> 5 #include <variant> 6 #include <any> 7 #include <string> 8 #include <optio 阅读全文

posted @ 2020-06-10 14:45 NoNight 阅读(214) 评论(0) 推荐(0) 编辑

c++17

摘要: std::variant<std::string,int,float>;//作为联合体 using va = std::variant<std::string, int, float>; va v = 23; cout << std::get<int>(v); va v2 = "this is he 阅读全文

posted @ 2020-06-10 13:48 NoNight 阅读(454) 评论(0) 推荐(0) 编辑