#include #include #include #include #include #include #include #include #include #include template void write_typeid() { std::system((std::string("c++filt ")+ std::string(typeid(T).name())).c_str()); std::cout << std::endl; } template void write_typeid(const T&) { write_typeid(); } struct t1 { }; struct t2 { }; struct t3 { }; struct t4 { }; using namespace mcs; using namespace mcs::units; int main() { typedef Rational<1> r1; typedef Rational<2> r2; typedef Rational<3> r3; typedef Rational<-3> rm3; typedef boost::mpl::list, dim, dim, dim, dim, dim, dim > l1; typedef boost::mpl::list, dim, dim, dim > l2; typedef boost::mpl::list, dim, dim, dim > l3; long sz = boost::mpl::size::value; typedef Negate::type n1; write_typeid(); typedef Add::type a1; write_typeid(); typedef Subtract::type s1; write_typeid(); typedef Multiply::type m1; write_typeid(); typedef Divide::type d1; write_typeid(); typedef Power >::type pw1; write_typeid(); typedef Root >::type rt1; write_typeid(); typedef reduce_dimension::type rd1; write_typeid(); BOOST_STATIC_ASSERT((boost::is_same< rd1, dimensionless_type >::value == true)); return 0; }