ART: Replace COMPILE_ASSERT with static_assert (runtime)
Replace all occurrences of COMPILE_ASSERT in the runtime tree.
Change-Id: I01e420899c760094fb342cc6cb9e692dd670a0b2
diff --git a/runtime/utils.h b/runtime/utils.h
index 39011e2..669fe6c 100644
--- a/runtime/utils.h
+++ b/runtime/utils.h
@@ -84,7 +84,7 @@
template<int n, typename T>
static inline bool IsAligned(T x) {
- COMPILE_ASSERT((n & (n - 1)) == 0, n_not_power_of_two);
+ static_assert((n & (n - 1)) == 0, "n is not a power of two");
return (x & (n - 1)) == 0;
}
@@ -222,7 +222,7 @@
// of V >= size of U (compile-time checked).
template<typename U, typename V>
static inline V bit_cast(U in) {
- COMPILE_ASSERT(sizeof(U) <= sizeof(V), size_of_u_not_le_size_of_v);
+ static_assert(sizeof(U) <= sizeof(V), "Size of U not <= size of V");
union {
U u;
V v;