diff options
Diffstat (limited to 'runtime/base/macros.h')
-rw-r--r-- | runtime/base/macros.h | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/runtime/base/macros.h b/runtime/base/macros.h index d297439..66d6fab 100644 --- a/runtime/base/macros.h +++ b/runtime/base/macros.h @@ -41,28 +41,6 @@ #define FINAL #endif -// The COMPILE_ASSERT macro can be used to verify that a compile time -// expression is true. For example, you could use it to verify the -// size of a static array: -// -// COMPILE_ASSERT(ARRAYSIZE(content_type_names) == CONTENT_NUM_TYPES, -// content_type_names_incorrect_size); -// -// or to make sure a struct is smaller than a certain size: -// -// COMPILE_ASSERT(sizeof(foo) < 128, foo_too_large); -// -// The second argument to the macro is the name of the variable. If -// the expression is false, most compilers will issue a warning/error -// containing the name of the variable. - -template <bool> -struct CompileAssert { -}; - -#define COMPILE_ASSERT(expr, msg) \ - typedef CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1] // NOLINT - // Declare a friend relationship in a class with a test. Used rather that FRIEND_TEST to avoid // globally importing gtest/gtest.h into the main ART header files. #define ART_FRIEND_TEST(test_set_name, individual_test)\ |