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

Unified Diff: webrtc/system_wrappers/include/compile_assert_c.h

Issue 2014023002: Add clz functions (Count number of Leading Zero bits), 32-and 64-bit variants (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@bug601787-1
Patch Set: fix comments Created 4 years, 7 months 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 | « webrtc/common_audio/signal_processing/spl_inl.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/system_wrappers/include/compile_assert_c.h
diff --git a/webrtc/system_wrappers/include/compile_assert_c.h b/webrtc/system_wrappers/include/compile_assert_c.h
index b402d7192d564a8d1d9d9f678ebd3db10f69b81a..00f6306e9f4635ed068d6cc60150368bc778edc6 100644
--- a/webrtc/system_wrappers/include/compile_assert_c.h
+++ b/webrtc/system_wrappers/include/compile_assert_c.h
@@ -11,14 +11,11 @@
#ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_COMPILE_ASSERT_H_
#define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_COMPILE_ASSERT_H_
-#ifdef __cplusplus
-#error "Only use this for C files. For C++, use static_assert."
-#endif
-
// Use this macro to verify at compile time that certain restrictions are met.
// The argument is the boolean expression to evaluate.
// Example:
// COMPILE_ASSERT(sizeof(foo) < 128);
+// Note: In C++, use static_assert instead!
#define COMPILE_ASSERT(expression) switch (0) {case 0: case expression:;}
#endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_COMPILE_ASSERT_H_
« no previous file with comments | « webrtc/common_audio/signal_processing/spl_inl.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698