realroot_doc 0.1.1
/Users/mourrain/Devel/mmx/realroot/include/realroot/texp_sup.hpp
Go to the documentation of this file.
00001 #ifndef realroot_ARITHM_TRAITS_SUP_H
00002 #define realroot_ARITHM_TRAITS_SUP_H
00003 
00004 #define SUP_T(A,B) typename texp::sup<A,B>::T 
00005 
00006 #include "realroot/texp_issubsetof.hpp"
00007 
00008 namespace mmx {
00009 
00010 namespace texp {
00011 
00012 template<typename X, typename Y>
00013 struct sup_ 
00014 {
00015   typedef X T;
00016 };
00017 
00018 //  template<typename X> struct sup_<X,X> { typedef X T; };
00019 template<class X,class Y> struct sup;
00020 
00021 template<typename X, typename Y>
00022 struct sup
00023 {
00024   typedef typename ucstref<X>::T _X;
00025   typedef typename ucstref<Y>::T _Y;
00026   typedef typename issubsetof< X, Y >::T TA;
00027   typedef typename issubsetof< Y, X >::T TB;
00028   typedef typename tselect< TA, Y, null_t >::T A;
00029   typedef typename tselect< TB, X, null_t >::T B;
00030   typedef typename sup_<_X,_Y>::T C;
00031   typedef typename sfirstnn< C, A, B >::T T;
00032 };
00033 
00034 }
00035 
00036 }// end namespace mmx
00037 
00038 #endif