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 c97817cce7954d3ccb344f9aadefc3db6f5dbec7..c32f78a127f81e26f1839eb833765383c4fec223 100644 |
--- a/chrome/installer/mini_installer/mini_string.h |
+++ b/chrome/installer/mini_installer/mini_string.h |
@@ -5,6 +5,13 @@ |
#ifndef CHROME_INSTALLER_MINI_INSTALLER_MINI_STRING_H_ |
#define CHROME_INSTALLER_MINI_INSTALLER_MINI_STRING_H_ |
+#ifndef COMPILE_ASSERT |
+// COMPILE_ASSERT macro borrowed from basictypes.h |
+template <bool> |
+struct CompileAssert {}; |
+#define COMPILE_ASSERT(expr, msg) \ |
+ typedef CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1] |
+#endif |
namespace mini_installer { |
@@ -65,7 +72,7 @@ |
class StackString { |
public: |
StackString() { |
- static_assert(kCapacity != 0, "invalid buffer size"); |
+ COMPILE_ASSERT(kCapacity != 0, invalid_buffer_size); |
buffer_[kCapacity] = L'\0'; // We always reserve 1 more than asked for. |
clear(); |
} |