… | |
… | |
208 | #else |
208 | #else |
209 | #define ecb_mod(m,n) ((m) < 0 ? ((n) - 1 - ((-1 - (m)) % (n))) : ((m) % (n))) |
209 | #define ecb_mod(m,n) ((m) < 0 ? ((n) - 1 - ((-1 - (m)) % (n))) : ((m) % (n))) |
210 | #endif |
210 | #endif |
211 | |
211 | |
212 | #if ecb_cplusplus_does_not_suck |
212 | #if ecb_cplusplus_does_not_suck |
213 | // does not work for local types (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm) |
213 | /* does not work for local types (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm) */ |
214 | template<typename T, int N> |
214 | template<typename T, int N> |
215 | static inline int ecb_array_length (const T (&arr)[N]) |
215 | static inline int ecb_array_length (const T (&arr)[N]) |
216 | { |
216 | { |
217 | return N; |
217 | return N; |
218 | } |
218 | } |