realroot_doc 0.1.1
/Users/mourrain/Devel/mmx/realroot/include/realroot/texp_rationalof.hpp
Go to the documentation of this file.
00001 #ifndef realroot_ARITHM_TRAITS_RATIONALOF_H
00002 #define realroot_ARITHM_TRAITS_RATIONALOF_H
00003 #include <realroot/texp_integerof.hpp>
00004 
00005 namespace mmx {
00006 
00007 namespace texp
00008 {
00009   template<class X> struct rationalof_  { typedef null_t T; };
00010   //  { typedef mpq_class T; };
00011   //  { Rational< typename integerof<X>::T > T;  };
00012   template<class K, class X>
00013   struct kernel_rationalof { typedef typename K::rational T; };
00014   template<class X>
00015   struct kernel_rationalof<null_t,X> { typedef typename rationalof_<X>::T T; };
00016   template<class X>
00017   struct rationalof
00018   {
00019     typedef typename ucstref<X>::T _X;
00020     typedef typename kernel_rationalof< typename kernelof<X>::T, _X  >::T T;
00021   };
00022 };
00023 
00024 }// end namespace mmx
00025 
00026 #endif