]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TEvtGen/HepMC/is_arithmetic.h
Updates EvtGen Code
[u/mrichter/AliRoot.git] / TEvtGen / HepMC / is_arithmetic.h
1 #ifndef IS_ARITHMETIC
2 #define IS_ARITHMETIC
3 // author: Walter Brown
4
5 // ----------------------------------------------------------------------
6 // prolog
7
8 namespace HepMC  {
9
10 ///
11 /// \namespace detail
12 /// internal namespace
13 ///
14 namespace detail  {
15
16
17 // ----------------------------------------------------------------------
18 // is_arithmetic<>
19
20 /// undefined and therefore non-arithmetic
21 template< class T >
22   struct is_arithmetic
23 {
24   static  bool const  value = false;
25 };
26
27 /// character is arithmetic
28 template<>
29   struct is_arithmetic<char>
30 { static  bool const  value = true; };
31
32 /// unsigned character is arithmetic
33 template<>
34   struct is_arithmetic<unsigned char>
35 { static  bool const  value = true; };
36
37 /// signed character is arithmetic
38 template<>
39   struct is_arithmetic<signed char>
40 { static  bool const  value = true; };
41
42 /// short is arithmetic
43 template<>
44   struct is_arithmetic<short>
45 { static  bool const  value = true; };
46
47 /// unsigned short is arithmetic
48 template<>
49   struct is_arithmetic<unsigned short>
50 { static  bool const  value = true; };
51
52 /// int is arithmetic
53 template<>
54   struct is_arithmetic<int>
55 { static  bool const  value = true; };
56
57 /// unsigned int is arithmetic
58 template<>
59   struct is_arithmetic<unsigned int>
60 { static  bool const  value = true; };
61
62 /// long is arithmetic
63 template<>
64   struct is_arithmetic<long>
65 { static  bool const  value = true; };
66
67 /// unsigned long is arithmetic
68 template<>
69   struct is_arithmetic<unsigned long>
70 { static  bool const  value = true; };
71
72 /// float is arithmetic
73 template<>
74   struct is_arithmetic<float>
75 { static  bool const  value = true; };
76
77 /// double is arithmetic
78 template<>
79   struct is_arithmetic<double>
80 { static  bool const  value = true; };
81
82 /// long double is arithmetic
83 template<>
84   struct is_arithmetic<long double>
85 { static  bool const  value = true; };
86
87
88 // ----------------------------------------------------------------------
89 // epilog
90
91 }  // namespace detail
92 }  // namespace HepMC
93
94 #endif  // IS_ARITHMETIC