Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / mojo / public / c / system / macros.h
index 4be0249..322c3be 100644 (file)
 #endif
 
 // This macro is currently C++-only, but we want to use it in the C core.h.
-#ifdef __cplusplus
 // Used to assert things at compile time.
+#if __cplusplus >= 201103L
+#define MOJO_COMPILE_ASSERT(expr, msg) static_assert(expr, #msg)
+#elif defined(__cplusplus)
 namespace mojo { template <bool> struct CompileAssert {}; }
 #define MOJO_COMPILE_ASSERT(expr, msg) \
     typedef ::mojo::CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1]