parent
756af8cc4c
commit
b3226a5107
@ -92,7 +92,6 @@ main()
|
||||
{
|
||||
using namespace boost::fusion;
|
||||
using namespace boost;
|
||||
using namespace std;
|
||||
|
||||
std::cout << tuple_open('[');
|
||||
std::cout << tuple_close(']');
|
||||
@ -111,8 +110,8 @@ main()
|
||||
at_c<1>(p) = 9;
|
||||
BOOST_TEST(p == make_vector(6, 9));
|
||||
|
||||
BOOST_STATIC_ASSERT(result_of::size<ns::point>::value == 2);
|
||||
BOOST_STATIC_ASSERT(!result_of::empty<ns::point>::value);
|
||||
BOOST_STATIC_ASSERT(boost::fusion::result_of::size<ns::point>::value == 2);
|
||||
BOOST_STATIC_ASSERT(!boost::fusion::result_of::empty<ns::point>::value);
|
||||
|
||||
BOOST_TEST(front(p) == 6);
|
||||
BOOST_TEST(back(p) == 9);
|
||||
|
@ -64,7 +64,6 @@ main()
|
||||
{
|
||||
using namespace boost::fusion;
|
||||
using namespace boost;
|
||||
using namespace std;
|
||||
|
||||
std::cout << tuple_open('[');
|
||||
std::cout << tuple_close(']');
|
||||
|
@ -55,7 +55,6 @@ int
|
||||
main()
|
||||
{
|
||||
using namespace boost::fusion;
|
||||
using namespace std;
|
||||
|
||||
std::cout << tuple_open('[');
|
||||
std::cout << tuple_close(']');
|
||||
|
@ -56,7 +56,6 @@ int
|
||||
main()
|
||||
{
|
||||
using namespace boost::fusion;
|
||||
using namespace std;
|
||||
|
||||
std::cout << tuple_open('[');
|
||||
std::cout << tuple_close(']');
|
||||
|
@ -61,7 +61,6 @@ main()
|
||||
{
|
||||
using namespace boost::fusion;
|
||||
using namespace boost;
|
||||
using namespace std;
|
||||
|
||||
std::cout << tuple_open('[');
|
||||
std::cout << tuple_close(']');
|
||||
|
@ -57,7 +57,6 @@ int
|
||||
main()
|
||||
{
|
||||
using namespace boost::fusion;
|
||||
using namespace std;
|
||||
|
||||
typedef ns::point<int,int> point;
|
||||
|
||||
|
@ -78,7 +78,6 @@ main()
|
||||
{
|
||||
using namespace boost::fusion;
|
||||
using namespace boost;
|
||||
using namespace std;
|
||||
|
||||
std::cout << tuple_open('[');
|
||||
std::cout << tuple_close(']');
|
||||
|
@ -56,7 +56,6 @@ main()
|
||||
{
|
||||
using namespace boost::fusion;
|
||||
using namespace boost;
|
||||
using namespace std;
|
||||
|
||||
std::cout << tuple_open('[');
|
||||
std::cout << tuple_close(']');
|
||||
|
@ -65,7 +65,6 @@ int
|
||||
main()
|
||||
{
|
||||
using namespace boost::fusion;
|
||||
using namespace std;
|
||||
|
||||
typedef ns::point<int, int> point;
|
||||
|
||||
|
@ -37,7 +37,6 @@ main()
|
||||
{
|
||||
using namespace boost::fusion;
|
||||
using namespace boost;
|
||||
using namespace std;
|
||||
|
||||
std::cout << tuple_open('[');
|
||||
std::cout << tuple_close(']');
|
||||
|
@ -28,7 +28,6 @@ main()
|
||||
{
|
||||
using namespace boost::fusion;
|
||||
using namespace boost;
|
||||
using namespace std;
|
||||
namespace fusion = boost::fusion;
|
||||
using boost::fusion::pair;
|
||||
using boost::fusion::make_pair;
|
||||
|
@ -28,7 +28,6 @@ main()
|
||||
{
|
||||
using namespace boost::fusion;
|
||||
using namespace boost;
|
||||
using namespace std;
|
||||
namespace fusion = boost::fusion;
|
||||
using boost::fusion::pair;
|
||||
using boost::fusion::make_pair;
|
||||
|
@ -36,7 +36,6 @@ main()
|
||||
{
|
||||
using namespace boost::fusion;
|
||||
using namespace boost;
|
||||
using namespace std;
|
||||
|
||||
std::cout << tuple_open('[');
|
||||
std::cout << tuple_close(']');
|
||||
|
@ -30,13 +30,12 @@ main()
|
||||
{
|
||||
using namespace boost::fusion;
|
||||
using namespace boost;
|
||||
using namespace std;
|
||||
|
||||
{
|
||||
vector0<> vec;
|
||||
(void) vec;
|
||||
cout << "(): " << sizeof(vec) << endl;
|
||||
cout << (boost::is_empty<vector0<> >::value ? "is empty" : "is not empty") << endl;
|
||||
std::cout << "(): " << sizeof(vec) << std::endl;
|
||||
std::cout << (boost::is_empty<vector0<> >::value ? "is empty" : "is not empty") << std::endl;
|
||||
}
|
||||
|
||||
{
|
||||
@ -56,7 +55,7 @@ main()
|
||||
typedef vector1<int> type;
|
||||
type vec(123);
|
||||
BOOST_TEST(at_c<0>(vec) == 123);
|
||||
cout << "(int): " << sizeof(vec) << endl;
|
||||
std::cout << "(int): " << sizeof(vec) << std::endl;
|
||||
}
|
||||
|
||||
{ // testing const vector
|
||||
@ -91,7 +90,7 @@ main()
|
||||
type vec(123, 'x');
|
||||
BOOST_TEST(at_c<0>(vec) == 123);
|
||||
BOOST_TEST(at_c<1>(vec) == 'x');
|
||||
cout << "(int, char): " << sizeof(vec) << endl;
|
||||
std::cout << "(int, char): " << sizeof(vec) << std::endl;
|
||||
}
|
||||
|
||||
{
|
||||
@ -120,19 +119,19 @@ main()
|
||||
BOOST_TEST(at_c<0>(vec) == 123);
|
||||
BOOST_TEST(at_c<1>(vec) == 'x');
|
||||
BOOST_TEST(at_c<2>(vec) >= 123.455 && at_c<2>(vec) <= 123.457);
|
||||
cout << "(int, char, double): " << sizeof(vec) << endl;
|
||||
std::cout << "(int, char, double): " << sizeof(vec) << std::endl;
|
||||
}
|
||||
|
||||
{
|
||||
typedef vector4<int, char, double, bool> type;
|
||||
type vec(123, 'x', 123.456, true);
|
||||
cout << "(int, char, double, bool): " << sizeof(vec) << endl;
|
||||
std::cout << "(int, char, double, bool): " << sizeof(vec) << std::endl;
|
||||
}
|
||||
|
||||
{
|
||||
typedef vector4<int, char, bool, double> type;
|
||||
type vec(123, 'x', true, 123.456);
|
||||
cout << "(int, char, bool, double): " << sizeof(vec) << endl;
|
||||
std::cout << "(int, char, bool, double): " << sizeof(vec) << std::endl;
|
||||
}
|
||||
|
||||
{
|
||||
@ -154,13 +153,13 @@ main()
|
||||
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;
|
||||
std::cout << "(bool, char, short, int, long, float, double): " << sizeof(vec) << std::endl;
|
||||
}
|
||||
|
||||
{
|
||||
typedef vector10<int, int, int, int, int, int, int, int, int, int> type;
|
||||
type vec; // compile check only
|
||||
cout << "vector10 of int: " << sizeof(vec) << endl;
|
||||
std::cout << "vector10 of int: " << sizeof(vec) << std::endl;
|
||||
}
|
||||
|
||||
{
|
||||
@ -169,7 +168,7 @@ main()
|
||||
, int, int, int, int, int, int, int, int, int, int> type;
|
||||
|
||||
type vec; // compile check only
|
||||
cout << "vector20 of int: " << sizeof(vec) << endl;
|
||||
std::cout << "vector20 of int: " << sizeof(vec) << std::endl;
|
||||
}
|
||||
|
||||
{
|
||||
@ -179,7 +178,7 @@ main()
|
||||
, int, int, int, int, int, int, int, int, int, int> type;
|
||||
|
||||
type vec; // compile check only
|
||||
cout << "vector30 of int: " << sizeof(vec) << endl;
|
||||
std::cout << "vector30 of int: " << sizeof(vec) << std::endl;
|
||||
}
|
||||
|
||||
{
|
||||
@ -190,7 +189,7 @@ main()
|
||||
, int, int, int, int, int, int, int, int, int, int> type;
|
||||
|
||||
type vec; // compile check only
|
||||
cout << "vector40 of int: " << sizeof(vec) << endl;
|
||||
std::cout << "vector40 of int: " << sizeof(vec) << std::endl;
|
||||
}
|
||||
|
||||
{
|
||||
@ -202,7 +201,7 @@ main()
|
||||
, int, int, int, int, int, int, int, int, int, int> type;
|
||||
|
||||
type vec; // compile check only
|
||||
cout << "vector50 of int: " << sizeof(vec) << endl;
|
||||
std::cout << "vector50 of int: " << sizeof(vec) << std::endl;
|
||||
}
|
||||
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user