Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Unified Diff: Source/wtf/Assertions.h

Issue 805073002: just use c++ static_assert everywhere (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remove gcc version check around WTF_COMPILER_SUPPORTS_CXX_EXPLICIT_CONVERSIONS Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/wtf/Compiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/Assertions.h
diff --git a/Source/wtf/Assertions.h b/Source/wtf/Assertions.h
index 5e5dd68b47895ba71002cb204e72d211a073d113..981b2a0a953276e3bdba937afaf42819cde91a14 100644
--- a/Source/wtf/Assertions.h
+++ b/Source/wtf/Assertions.h
@@ -292,15 +292,8 @@ while (0)
#endif
/* COMPILE_ASSERT */
-#ifndef COMPILE_ASSERT
-#if COMPILER_SUPPORTS(C_STATIC_ASSERT)
-/* Unlike static_assert below, this also works in plain C code. */
-#define COMPILE_ASSERT(exp, name) _Static_assert((exp), #name)
-#elif COMPILER_SUPPORTS(CXX_STATIC_ASSERT)
-#define COMPILE_ASSERT(exp, name) static_assert((exp), #name)
-#else
-#define COMPILE_ASSERT(exp, name) typedef int dummy##name [(exp) ? 1 : -1]
-#endif
+#ifndef COMPILE_ASSERT // also defined in base/macros.h
+#define COMPILE_ASSERT(exp, msg) static_assert((exp), #msg)
#endif
/* FATAL */
« no previous file with comments | « no previous file | Source/wtf/Compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698