realroot_doc 0.1.1
/Users/mourrain/Devel/mmx/realroot/include/realroot/texp_isring.hpp
Go to the documentation of this file.
00001 #ifndef realroot_ARITHM_TRAITS_ISRING_H
00002 #define realroot_ARITHM_TRAITS_ISRING_H
00003 
00004 #include <realroot/texp_kernelof.hpp>
00005 
00006 //======================================================================
00007 namespace mmx {
00008 //======================================================================
00009 
00010 namespace texp {
00011 
00012   template<typename X>
00013   struct isring_ { typedef null_t T; };
00014   
00015   template<>
00016   struct isring_<int> { typedef true_t T; };
00017   template<>
00018   struct isring_<long int> { typedef true_t T; };
00019   template<>
00020   struct isring_<float> { typedef true_t T; };
00021   template<>
00022   struct isring_<double> { typedef true_t T; };
00023   template<>
00024   struct isring_<long double> { typedef true_t T; };
00025   
00026   template<typename K, typename X>
00027   struct kernel_isring { typedef true_t T; };
00028   template<typename X>
00029   struct kernel_isring<null_t,X> { typedef typename isring_<X>::T T; };
00030 
00031   template<typename X>
00032   struct isring
00033   {
00034     typedef  typename ucstref<X>::T   _X;
00035     typedef  typename kernel_isring< typename kernelof<_X>::T, _X >::T T;
00036   };
00037   
00038   
00039 }
00040 //======================================================================
00041 } //  namespace mmx 
00042 //======================================================================
00043 #endif