Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

more/math/altprecint.h

Go to the documentation of this file.
00001 namespace more {
00002   template<int N, int dummy = (N > sizeof(big_uint))>
00003     struct uint_with_size_ {
00004         typedef typename uint_with_size_<N+1>::eval eval;
00005     };
00006   template<int N>
00007     struct uint_with_size_<N, 1> { typedef big_uint eval; };
00008 
00009   template<>
00010     struct uint_with_size_<sizeof(unsigned char)>
00011           { typedef unsigned char eval; };
00012   template<>
00013     struct uint_with_size_<sizeof(unsigned short)>
00014           { typedef unsigned short eval; };
00015   template<>
00016     struct uint_with_size_< sizeof(unsigned int),
00017            (sizeof(unsigned short)==sizeof(unsigned int)) >
00018           { typedef unsigned int eval; };
00019   template<>
00020     struct uint_with_size_< sizeof(unsigned long),
00021            (sizeof(unsigned int)==sizeof(unsigned long)) >
00022           { typedef unsigned long eval; };
00023 #ifndef CXX_HAVE_LONG_LONG
00024   template<>
00025     struct uint_with_size_< sizeof(unsigned long)+1 >
00026           { typedef unsigned long eval; };
00027 #else
00028   template<>
00029     struct uint_with_size_< sizeof(unsigned long long),
00030            (sizeof(unsigned long)==sizeof(unsigned long long)) >
00031           { typedef unsigned long long eval; };
00032   template<>
00033     struct uint_with_size_< sizeof(unsigned long long)+1 >
00034           { typedef unsigned long long eval; };
00035 #endif
00036 
00037   typedef uint_with_size_<sizeof(float)>::eval float_prec_uint;
00038   typedef uint_with_size_<sizeof(double)>::eval double_prec_uint;
00039   typedef uint_with_size_<sizeof(long double)>::eval long_double_prec_uint;
00040 }

Generated on Sat Sep 7 19:11:17 2002 for more with Doxygen 1.2.13.1. Doxygen 1.2.13.1 is written and copyright 1997-2002 by Dimitri van Heesch.