{"published":"2016-11-21 06:09:28","title":"std::variant","categories":["C++"],"image_url":null,"version":"1.0","blog_url":"https://nekko1119.hatenablog.com/","provider_url":"https://hatena.blog","url":"https://nekko1119.hatenablog.com/entry/2016/11/21/060928","description":"C++17\u306b\u306fstd::variant\u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002 variant\u306f\u7d44\u307f\u8fbc\u307f\u306eunion\u3088\u308a\u30ea\u30c3\u30c1\u306a\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3092\u6301\u3063\u305f\u578b\u5b89\u5168\u306aunion\u3067\u3059\u3002*1 Visual Studio 2017\u306b\u3082\u5165\u308a\u307e\u3057\u305f\u306e\u3067\u7c21\u5358\u306a\u30b5\u30f3\u30d7\u30eb\u3092\u66f8\u3044\u3066\u307f\u307e\u3057\u305f #include <variant> #include <iostream> #include <string> struct visitor { void operator()(int) const { std::cout << \"it's int\" << std::endl; } void operator()(std::string\u2026","author_url":"https://blog.hatena.ne.jp/nekko1119/","width":"100%","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnekko1119.hatenablog.com%2Fentry%2F2016%2F11%2F21%2F060928\" title=\"std::variant - C++\u3068\u8272\u3005\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","type":"rich","blog_title":"C++\u3068\u8272\u3005","height":"190","provider_name":"Hatena Blog","author_name":"nekko1119"}