Hello,

 

I am trying to create a boost::variant from a joint_view sequence of two mpl sequences.

Can someone tell me what’s wrong in the following example. I can’t get this to compile using MSVC 2005.

 

 

Thanks,

Naveen

 

 

 

#include <iostream>

#include <string>

#include <boost/mpl/vector.hpp>

#include <boost/mpl/joint_view.hpp>

#include <boost/mpl/transform.hpp>

#include <boost/variant.hpp>

 

using namespace boost;

 

typedef boost::mpl::vector<int, std::string> t1;

typedef boost::mpl::vector<double, char> t2;

typedef boost::mpl::joint_view< t1, t2 > mixed;

typedef boost::make_variant_over< mixed >::type myTypeTest;

 

void main()

{

      try

      {

            myTypeTest t(“name”);

      }

      catch( std::exception& e)

      {

            std::cerr << "Exception caught : " << e.what();

      }

}