OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // This file contains macros and macro-like constructs (e.g., templates) that | 5 // This file contains macros and macro-like constructs (e.g., templates) that |
6 // are commonly used throughout Chromium source. (It may also contain things | 6 // are commonly used throughout Chromium source. (It may also contain things |
7 // that are closely related to things that are commonly used that belong in this | 7 // that are closely related to things that are commonly used that belong in this |
8 // file.) | 8 // file.) |
9 | 9 |
10 #ifndef BASE_MACROS_H_ | 10 #ifndef BASE_MACROS_H_ |
(...skipping 11 matching lines...) Expand all Loading... |
22 // COMPILE_ASSERT(sizeof(foo) < 128, foo_too_large); | 22 // COMPILE_ASSERT(sizeof(foo) < 128, foo_too_large); |
23 // | 23 // |
24 // The second argument to the macro is the name of the variable. If | 24 // The second argument to the macro is the name of the variable. If |
25 // the expression is false, most compilers will issue a warning/error | 25 // the expression is false, most compilers will issue a warning/error |
26 // containing the name of the variable. | 26 // containing the name of the variable. |
27 | 27 |
28 #undef COMPILE_ASSERT | 28 #undef COMPILE_ASSERT |
29 #define COMPILE_ASSERT(expr, msg) static_assert(expr, #msg) | 29 #define COMPILE_ASSERT(expr, msg) static_assert(expr, #msg) |
30 | 30 |
31 #endif // BASE_MACROS_H_ | 31 #endif // BASE_MACROS_H_ |
OLD | NEW |