Fusion: fixed ambiguities in tests on VC10

[SVN r59347]
This commit is contained in:
Hartmut Kaiser
2010-01-29 16:02:14 +00:00
parent 83ed7ffada
commit b86d7dbe80
2 changed files with 15 additions and 15 deletions

View File

@ -121,8 +121,8 @@ main()
BOOST_MPL_ASSERT((fusion::result_of::has_key<ns::point, ns::y_member>));
BOOST_MPL_ASSERT((mpl::not_<fusion::result_of::has_key<ns::point, ns::z_member> >));
BOOST_MPL_ASSERT((is_same<fusion::result_of::value_at_key<ns::point, ns::x_member>::type, int>));
BOOST_MPL_ASSERT((is_same<fusion::result_of::value_at_key<ns::point, ns::y_member>::type, int>));
BOOST_MPL_ASSERT((boost::is_same<fusion::result_of::value_at_key<ns::point, ns::x_member>::type, int>));
BOOST_MPL_ASSERT((boost::is_same<fusion::result_of::value_at_key<ns::point, ns::y_member>::type, int>));
ns::point p = {5, 3};

View File

@ -45,7 +45,7 @@ main()
BOOST_STATIC_ASSERT(result_of::size<type>::value == 1);
BOOST_TEST(at_c<0>(vec) == 0);
BOOST_STATIC_ASSERT((is_same<int, result_of::value_at_c<type, 0>::type>::value));
BOOST_STATIC_ASSERT((boost::is_same<int, result_of::value_at_c<type, 0>::type>::value));
// prove that it is mutable
at_c<0>(vec) = 987;
@ -82,8 +82,8 @@ main()
BOOST_TEST(at_c<0>(vec) == 0);
BOOST_TEST(at_c<1>(vec) == char());
BOOST_STATIC_ASSERT((is_same<int, result_of::value_at_c<type, 0>::type>::value));
BOOST_STATIC_ASSERT((is_same<char, result_of::value_at_c<type, 1>::type>::value));
BOOST_STATIC_ASSERT((boost::is_same<int, result_of::value_at_c<type, 0>::type>::value));
BOOST_STATIC_ASSERT((boost::is_same<char, result_of::value_at_c<type, 1>::type>::value));
}
{
@ -109,9 +109,9 @@ main()
BOOST_TEST(at_c<1>(vec) == char());
BOOST_TEST(at_c<2>(vec) == double());
BOOST_STATIC_ASSERT((is_same<int, result_of::value_at_c<type, 0>::type>::value));
BOOST_STATIC_ASSERT((is_same<char, result_of::value_at_c<type, 1>::type>::value));
BOOST_STATIC_ASSERT((is_same<double, result_of::value_at_c<type, 2>::type>::value));
BOOST_STATIC_ASSERT((boost::is_same<int, result_of::value_at_c<type, 0>::type>::value));
BOOST_STATIC_ASSERT((boost::is_same<char, result_of::value_at_c<type, 1>::type>::value));
BOOST_STATIC_ASSERT((boost::is_same<double, result_of::value_at_c<type, 2>::type>::value));
}
{
@ -147,13 +147,13 @@ main()
BOOST_TEST(at_c<5>(vec) >= 5.9 && at_c<5>(vec) <= 6.1);
BOOST_TEST(at_c<6>(vec) >= 6.9 && at_c<6>(vec) <= 7.1);
BOOST_STATIC_ASSERT((is_same<bool, result_of::value_at_c<type, 0>::type>::value));
BOOST_STATIC_ASSERT((is_same<char, result_of::value_at_c<type, 1>::type>::value));
BOOST_STATIC_ASSERT((is_same<short, result_of::value_at_c<type, 2>::type>::value));
BOOST_STATIC_ASSERT((is_same<int, result_of::value_at_c<type, 3>::type>::value));
BOOST_STATIC_ASSERT((is_same<long, result_of::value_at_c<type, 4>::type>::value));
BOOST_STATIC_ASSERT((is_same<float, result_of::value_at_c<type, 5>::type>::value));
BOOST_STATIC_ASSERT((is_same<double, result_of::value_at_c<type, 6>::type>::value));
BOOST_STATIC_ASSERT((boost::is_same<bool, result_of::value_at_c<type, 0>::type>::value));
BOOST_STATIC_ASSERT((boost::is_same<char, result_of::value_at_c<type, 1>::type>::value));
BOOST_STATIC_ASSERT((boost::is_same<short, result_of::value_at_c<type, 2>::type>::value));
BOOST_STATIC_ASSERT((boost::is_same<int, result_of::value_at_c<type, 3>::type>::value));
BOOST_STATIC_ASSERT((boost::is_same<long, result_of::value_at_c<type, 4>::type>::value));
BOOST_STATIC_ASSERT((boost::is_same<float, result_of::value_at_c<type, 5>::type>::value));
BOOST_STATIC_ASSERT((boost::is_same<double, result_of::value_at_c<type, 6>::type>::value));
cout << "(bool, char, short, int, long, float, double): " << sizeof(vec) << endl;
}