Index: sync/syncable/syncable_enum_conversions.cc |
diff --git a/sync/syncable/syncable_enum_conversions.cc b/sync/syncable/syncable_enum_conversions.cc |
index 7e0a8c984bee5fd61f946bed3a34146df9cf3413..190a3bb15d31c80fe70a3f35fdd729d6888f2b38 100644 |
--- a/sync/syncable/syncable_enum_conversions.cc |
+++ b/sync/syncable/syncable_enum_conversions.cc |
@@ -15,12 +15,12 @@ namespace syncable { |
// We can't tokenize expected_min/expected_max since it can be a |
// general expression. |
#define ASSERT_ENUM_BOUNDS(enum_min, enum_max, expected_min, expected_max) \ |
- COMPILE_ASSERT(static_cast<int>(enum_min) == \ |
- static_cast<int>(expected_min), \ |
- enum_min##_not_expected_min); \ |
- COMPILE_ASSERT(static_cast<int>(enum_max) == \ |
- static_cast<int>(expected_max), \ |
- enum_max##_not_expected_max); |
+ static_assert(static_cast<int>(enum_min) == \ |
+ static_cast<int>(expected_min), \ |
+ #enum_min " not " #expected_min); \ |
maniscalco
2015/01/07 18:22:50
nit: this trailing slash doesn't line up with the
Mostyn Bramley-Moore
2015/01/07 19:16:40
Done.
|
+ static_assert(static_cast<int>(enum_max) == \ |
+ static_cast<int>(expected_max), \ |
+ #enum_max " not " #expected_max); |
#define ENUM_CASE(enum_value) case enum_value: return #enum_value |