112:c062273efa33 | 113:b3a33bc2e482 |
---|---|
86 T clamp (T a, T b, T c) | 86 T clamp (T a, T b, T c) |
87 { | 87 { |
88 return (a < b) ? b : (a > c) ? c : a; | 88 return (a < b) ? b : (a > c) ? c : a; |
89 } | 89 } |
90 | 90 |
91 template <typename T, size_t N> | |
92 char (&_ArraySizeHelper(T (&array)[N]))[N]; | |
93 #define countof(array) (sizeof(_ArraySizeHelper( array ))) | |
94 | |
91 struct Exitception {}; | 95 struct Exitception {}; |
92 | 96 |
93 END_ZFC_NAMESPACE | 97 END_ZFC_NAMESPACE |