variant struct to construct dynamic types on cpp