OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_INSTALLER_MINI_INSTALLER_MINI_STRING_H_ | 5 #ifndef CHROME_INSTALLER_MINI_INSTALLER_MINI_STRING_H_ |
6 #define CHROME_INSTALLER_MINI_INSTALLER_MINI_STRING_H_ | 6 #define CHROME_INSTALLER_MINI_INSTALLER_MINI_STRING_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 |
8 #ifndef COMPILE_ASSERT | 10 #ifndef COMPILE_ASSERT |
9 // Some bots that build mini_installer don't know static_assert. | 11 // Some bots that build mini_installer don't know static_assert. |
10 #if __cplusplus >= 201103L | 12 #if __cplusplus >= 201103L |
11 #define COMPILE_ASSERT(expr, msg) static_assert(expr, #msg) | 13 #define COMPILE_ASSERT(expr, msg) static_assert(expr, #msg) |
12 #else | 14 #else |
13 template <bool> | 15 template <bool> |
14 struct CompileAssert {}; | 16 struct CompileAssert {}; |
15 #define COMPILE_ASSERT(expr, msg) \ | 17 #define COMPILE_ASSERT(expr, msg) \ |
16 typedef CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1] | 18 typedef CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1] |
17 #endif | 19 #endif |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 wchar_t buffer_[kCapacity + 1]; | 145 wchar_t buffer_[kCapacity + 1]; |
144 | 146 |
145 private: | 147 private: |
146 StackString(const StackString&); | 148 StackString(const StackString&); |
147 StackString& operator=(const StackString&); | 149 StackString& operator=(const StackString&); |
148 }; | 150 }; |
149 | 151 |
150 } // namespace mini_installer | 152 } // namespace mini_installer |
151 | 153 |
152 #endif // CHROME_INSTALLER_MINI_INSTALLER_MINI_STRING_H_ | 154 #endif // CHROME_INSTALLER_MINI_INSTALLER_MINI_STRING_H_ |
OLD | NEW |