| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 
 |  
struct MyFunction
{
	template<typename T1, typename T2>
	struct apply
	{
		typedef Foo<T1, T2> type;
	};
};
 
typedef boost::mpl::vector<bool, char> v1;
typedef boost::mpl::vector<short, int> v2;
 
typedef cartesian_product<v1, v2, MyFunction>::type result;
 
BOOST_MPL_ASSERT(( boost::is_same< boost::mpl::at_c<result, 0>::type, Foo<bool, short> >));
BOOST_MPL_ASSERT(( boost::is_same< boost::mpl::at_c<result, 1>::type, Foo<bool, int> >));
BOOST_MPL_ASSERT(( boost::is_same< boost::mpl::at_c<result, 2>::type, Foo<char, short> >));
BOOST_MPL_ASSERT(( boost::is_same< boost::mpl::at_c<result, 3>::type, Foo<char, char> >)); //ici problème de compilation: Foo<char, char> != Foo<char, int> | 
Partager