36 #ifndef CERES_PUBLIC_INTERNAL_MACROS_H_ 37 #define CERES_PUBLIC_INTERNAL_MACROS_H_ 52 #define CERES_DISALLOW_COPY_AND_ASSIGN(TypeName) \ 53 TypeName(const TypeName&); \ 54 void operator=(const TypeName&) 62 #define CERES_DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \ 64 CERES_DISALLOW_COPY_AND_ASSIGN(TypeName) 80 template <
typename T,
size_t N>
87 template <
typename T,
size_t N>
91 #define arraysize(array) (sizeof(ArraySizeHelper(array))) 138 #define CERES_ARRAYSIZE(a) \ 139 ((sizeof(a) / sizeof(*(a))) / \ 140 static_cast<size_t>(!(sizeof(a) % sizeof(*(a))))) 148 #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) \ 149 && !defined(COMPILER_ICC) 150 #define CERES_MUST_USE_RESULT __attribute__ ((warn_unused_result)) 152 #define CERES_MUST_USE_RESULT 162 #if defined(_MSC_VER) 163 #define CERES_ALIGN_ATTRIBUTE(n) __declspec(align(n)) 164 #define CERES_ALIGN_OF(T) __alignof(T) 165 #elif defined(__GNUC__) 166 #define CERES_ALIGN_ATTRIBUTE(n) __attribute__((aligned(n))) 167 #define CERES_ALIGN_OF(T) __alignof(T) 170 #endif // CERES_PUBLIC_INTERNAL_MACROS_H_ char(& ArraySizeHelper(T(&array)[N]))[N]