hepmc - Diff between revs 43 and 65
Subversion Repositories:
| Rev 43 | Rev 65 | |||
|---|---|---|---|---|
| Line 4... | Line 4... | |||
| 4 | 4 | |||
| 5 | // ---------------------------------------------------------------------- | 5 | // ---------------------------------------------------------------------- | |
| 6 | // prolog | 6 | // prolog | |
| 7 | 7 | |||
| 8 | namespace HepMC { | 8 | namespace HepMC { | |
| - | 9 | |||
| - | 10 | /// | ||
| - | 11 | /// \namespace detail | ||
| - | 12 | /// internal namespace | ||
| - | 13 | /// | ||
| 9 | namespace detail { | 14 | namespace detail { | |
| 10 | 15 | |||
| 11 | 16 | |||
| 12 | // ---------------------------------------------------------------------- | 17 | // ---------------------------------------------------------------------- | |
| 13 | // is_arithmetic<> | 18 | // is_arithmetic<> | |
| 14 | 19 | |||
| - | 20 | /// undefined and therefore non-arithmetic | ||
| 15 | template< class T > | 21 | template< class T > | |
| 16 | struct is_arithmetic | 22 | struct is_arithmetic | |
| 17 | { | 23 | { | |
| 18 | static bool const value = false; | 24 | static bool const value = false; | |
| 19 | }; | 25 | }; | |
| 20 | 26 | |||
| - | 27 | /// character is arithmetic | ||
| 21 | template<> | 28 | template<> | |
| 22 | struct is_arithmetic<char> | 29 | struct is_arithmetic<char> | |
| 23 | { static bool const value = true; }; | 30 | { static bool const value = true; }; | |
| 24 | 31 | |||
| - | 32 | /// unsigned character is arithmetic | ||
| 25 | template<> | 33 | template<> | |
| 26 | struct is_arithmetic<unsigned char> | 34 | struct is_arithmetic<unsigned char> | |
| 27 | { static bool const value = true; }; | 35 | { static bool const value = true; }; | |
| 28 | 36 | |||
| - | 37 | /// signed character is arithmetic | ||
| 29 | template<> | 38 | template<> | |
| 30 | struct is_arithmetic<signed char> | 39 | struct is_arithmetic<signed char> | |
| 31 | { static bool const value = true; }; | 40 | { static bool const value = true; }; | |
| 32 | 41 | |||
| - | 42 | /// short is arithmetic | ||
| 33 | template<> | 43 | template<> | |
| 34 | struct is_arithmetic<short> | 44 | struct is_arithmetic<short> | |
| 35 | { static bool const value = true; }; | 45 | { static bool const value = true; }; | |
| 36 | 46 | |||
| - | 47 | /// unsigned short is arithmetic | ||
| 37 | template<> | 48 | template<> | |
| 38 | struct is_arithmetic<unsigned short> | 49 | struct is_arithmetic<unsigned short> | |
| 39 | { static bool const value = true; }; | 50 | { static bool const value = true; }; | |
| 40 | 51 | |||
| - | 52 | /// int is arithmetic | ||
| 41 | template<> | 53 | template<> | |
| 42 | struct is_arithmetic<int> | 54 | struct is_arithmetic<int> | |
| 43 | { static bool const value = true; }; | 55 | { static bool const value = true; }; | |
| 44 | 56 | |||
| - | 57 | /// unsigned int is arithmetic | ||
| 45 | template<> | 58 | template<> | |
| 46 | struct is_arithmetic<unsigned int> | 59 | struct is_arithmetic<unsigned int> | |
| 47 | { static bool const value = true; }; | 60 | { static bool const value = true; }; | |
| 48 | 61 | |||
| - | 62 | /// long is arithmetic | ||
| 49 | template<> | 63 | template<> | |
| 50 | struct is_arithmetic<long> | 64 | struct is_arithmetic<long> | |
| 51 | { static bool const value = true; }; | 65 | { static bool const value = true; }; | |
| 52 | 66 | |||
| - | 67 | /// unsigned long is arithmetic | ||
| 53 | template<> | 68 | template<> | |
| 54 | struct is_arithmetic<unsigned long> | 69 | struct is_arithmetic<unsigned long> | |
| 55 | { static bool const value = true; }; | 70 | { static bool const value = true; }; | |
| 56 | 71 | |||
| - | 72 | /// float is arithmetic | ||
| 57 | template<> | 73 | template<> | |
| 58 | struct is_arithmetic<float> | 74 | struct is_arithmetic<float> | |
| 59 | { static bool const value = true; }; | 75 | { static bool const value = true; }; | |
| 60 | 76 | |||
| - | 77 | /// double is arithmetic | ||
| 61 | template<> | 78 | template<> | |
| 62 | struct is_arithmetic<double> | 79 | struct is_arithmetic<double> | |
| 63 | { static bool const value = true; }; | 80 | { static bool const value = true; }; | |
| 64 | 81 | |||
| - | 82 | /// long double is arithmetic | ||
| 65 | template<> | 83 | template<> | |
| 66 | struct is_arithmetic<long double> | 84 | struct is_arithmetic<long double> | |
| 67 | { static bool const value = true; }; | 85 | { static bool const value = true; }; | |
| 68 | 86 | |||
| 69 | 87 | |||
