namespace boost { template class ratio { static const boost::intmax_t ABS_N = mpl::abs_c::value; static const boost::intmax_t ABS_D = mpl::abs_c::value; static_assert(ABS_N >= 0,"ratio numerator is out of range"); static_assert(ABS_D > 0,"ratio denominator is out of range"); static_assert(D != 0,"ratio divide by 0"); static const boost::intmax_t SIGN_N = mpl::sign_c::value * mpl::sign_c::value; static const boost::intmax_t GCD = mpl::gcd_c::value; public: static const boost::intmax_t num = SIGN_N * ABS_N / GCD; static const boost::intmax_t den = ABS_D / GCD; typedef mpl::rational_c_tag tag; typedef boost::rational value_type; typedef boost::intmax_t num_type; typedef boost::intmax_t den_type; ratio() {} template ratio(const ratio<_N2, _D2>&, typename enable_if_c < (ratio<_N2, _D2>::num == num && ratio<_N2, _D2>::den == den) >::type* = 0) {} template typename enable_if_c < (ratio<_N2, _D2>::num == num && ratio<_N2, _D2>::den == den), ratio& >::type operator=(const ratio<_N2, _D2>&) {return *this;} static value_type value() {return value_type(num,den);} value_type operator()() const {return value();} #line 73 "C:\\prj2010\\test2.cpp" typedef ratio type; }; template const boost::intmax_t ratio::num; template const boost::intmax_t ratio::den; #line 82 "C:\\prj2010\\test2.cpp" template struct ratio_add : boost::ratio_detail::ratio_add::type { }; template struct ratio_subtract : boost::ratio_detail::ratio_subtract::type { }; template struct ratio_multiply : boost::ratio_detail::ratio_multiply::type { }; template struct ratio_divide : boost::ratio_detail::ratio_divide::type { }; template struct ratio_equal : public boost::integral_constant {}; template struct ratio_not_equal : public boost::integral_constant::value> {}; template struct ratio_less : boost::integral_constant::value> {}; template struct ratio_less_equal : boost::integral_constant::value> {}; template struct ratio_greater : boost::integral_constant::value> {}; template struct ratio_greater_equal : boost::integral_constant::value> {}; template struct ratio_gcd : ratio::value, mpl::lcm_c::value>::type { }; template struct ratio_negate : ratio<-R::num, R::den>::type { }; template struct ratio_abs : ratio::value, R::den>::type { }; template struct ratio_sign : mpl::sign_c { }; template struct ratio_inverse : ratio::type { }; template struct ratio_lcm : ratio::value, mpl::gcd_c::value>::type { }; template struct ratio_modulo : ratio<(R1::num * R2::den) % (R2::num * R1::den), R1::den * R2::den>::type { }; namespace detail { template struct ratio_min : R1 {}; template struct ratio_min : R2 {}; template struct ratio_max : R2 {}; template struct ratio_max : R1 {}; } template struct ratio_min : detail::ratio_min::value>::type { }; template struct ratio_max : detail::ratio_max::value>::type { }; template struct ratio_power : ratio_multiply< typename ratio_power::type, typename ratio_power::type, p/2>::type >::type {}; template struct ratio_power : ratio<1>::type {}; template struct ratio_power : R {}; template struct ratio_power : ratio_divide, R>::type {}; } using namespace std; int a = 5;