/******************************************************************************
Online C++ Compiler.
Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.
*******************************************************************************/
#include <iostream>
#include <variant>
#include <string>
int main() {
std::variant<int, std::string> v;
v = 10;
std::cout << std::get<int>(v) << std::endl;
v = "String";
std::cout << std::get<std::string>(v) << std::endl;
return 0;
}