CPP: Fix build issue
authorCecilia Roes <roes@google.com>
Fri, 14 Nov 2014 11:54:11 +0000 (11:54 +0000)
committerYoungjae Shin <yj99.shin@samsung.com>
Tue, 9 Jun 2015 11:43:22 +0000 (20:43 +0900)
cpp/src/phonenumbers/base/basictypes.h

index ac63259..b54abb7 100644 (file)
@@ -194,9 +194,13 @@ struct CompileAssert {
 };
 
 #if !defined(COMPILE_ASSERT)
+#if __cplusplus >= 201103L
+#define COMPILE_ASSERT(expr, msg) static_assert(expr, #msg)
+#else
 #define COMPILE_ASSERT(expr, msg) \
   typedef CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1]
 #endif
+#endif
 
 }  // namespace phonenumbers
 }  // namespace i18n