#include <boost/variant.hpp> 
#include <string> 

int main() 
{ 
  boost::variant<double, char, std::string> v; 
  v = 3.14; 
  v = 'A'; 
  v = "Hello, world!"; 
} 