Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:01:10

0001 #ifndef IS_ARITHMETIC
0002 #define IS_ARITHMETIC
0003 // author: Walter Brown
0004 
0005 // ----------------------------------------------------------------------
0006 // prolog
0007 
0008 namespace HepMC  {
0009 
0010 ///
0011 /// \namespace detail
0012 /// internal namespace
0013 ///
0014 namespace detail  {
0015 
0016 
0017 // ----------------------------------------------------------------------
0018 // is_arithmetic<>
0019 
0020 /// undefined and therefore non-arithmetic
0021 template< class T >
0022   struct is_arithmetic
0023 {
0024   static  bool const  value = false;
0025 };
0026 
0027 /// character is arithmetic
0028 template<>
0029   struct is_arithmetic<char>
0030 { static  bool const  value = true; };
0031 
0032 /// unsigned character is arithmetic
0033 template<>
0034   struct is_arithmetic<unsigned char>
0035 { static  bool const  value = true; };
0036 
0037 /// signed character is arithmetic
0038 template<>
0039   struct is_arithmetic<signed char>
0040 { static  bool const  value = true; };
0041 
0042 /// short is arithmetic
0043 template<>
0044   struct is_arithmetic<short>
0045 { static  bool const  value = true; };
0046 
0047 /// unsigned short is arithmetic
0048 template<>
0049   struct is_arithmetic<unsigned short>
0050 { static  bool const  value = true; };
0051 
0052 /// int is arithmetic
0053 template<>
0054   struct is_arithmetic<int>
0055 { static  bool const  value = true; };
0056 
0057 /// unsigned int is arithmetic
0058 template<>
0059   struct is_arithmetic<unsigned int>
0060 { static  bool const  value = true; };
0061 
0062 /// long is arithmetic
0063 template<>
0064   struct is_arithmetic<long>
0065 { static  bool const  value = true; };
0066 
0067 /// unsigned long is arithmetic
0068 template<>
0069   struct is_arithmetic<unsigned long>
0070 { static  bool const  value = true; };
0071 
0072 /// float is arithmetic
0073 template<>
0074   struct is_arithmetic<float>
0075 { static  bool const  value = true; };
0076 
0077 /// double is arithmetic
0078 template<>
0079   struct is_arithmetic<double>
0080 { static  bool const  value = true; };
0081 
0082 /// long double is arithmetic
0083 template<>
0084   struct is_arithmetic<long double>
0085 { static  bool const  value = true; };
0086 
0087 
0088 // ----------------------------------------------------------------------
0089 // epilog
0090 
0091 }  // namespace detail
0092 }  // namespace HepMC
0093 
0094 #endif  // IS_ARITHMETIC