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

Unified Diff: chrome/installer/mini_installer/mini_string.h

Issue 1251553002: Try to unbreak mini_installer build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/mini_installer/mini_string.h
diff --git a/chrome/installer/mini_installer/mini_string.h b/chrome/installer/mini_installer/mini_string.h
index 52833a8087b897905b21a6cf6cc8287cc00ddfd4..23e53dc2b1b6fdf3e5c54f457efe1df811d56ce0 100644
--- a/chrome/installer/mini_installer/mini_string.h
+++ b/chrome/installer/mini_installer/mini_string.h
@@ -6,8 +6,15 @@
#define CHROME_INSTALLER_MINI_INSTALLER_MINI_STRING_H_
#ifndef COMPILE_ASSERT
-// COMPILE_ASSERT macro borrowed from macros.h
+// Some bots that build mini_installer don't know static_assert.
+#if __cplusplus >= 201103L
#define COMPILE_ASSERT(expr, msg) static_assert(expr, #msg)
+#else
+template <bool>
+struct CompileAssert {};
+#define COMPILE_ASSERT(expr, msg) \
+ typedef CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1]
+#endif
#endif
namespace mini_installer {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698