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

Side by Side Diff: third_party/macros.h

Issue 880603004: Merge to XFA: Add namespace and-re-arrange PDFium's local copy of /base. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « third_party/logging.h ('k') | third_party/numerics/OWNERS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
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
7 // that are closely related to things that are commonly used that belong in this
8 // file.)
9
10 #ifndef BASE_MACROS_H_
11 #define BASE_MACROS_H_
12
13 // The COMPILE_ASSERT macro can be used to verify that a compile time
14 // expression is true. For example, you could use it to verify the
15 // size of a static array:
16 //
17 // COMPILE_ASSERT(ARRAYSIZE_UNSAFE(content_type_names) == CONTENT_NUM_TYPES,
18 // content_type_names_incorrect_size);
19 //
20 // or to make sure a struct is smaller than a certain size:
21 //
22 // COMPILE_ASSERT(sizeof(foo) < 128, foo_too_large);
23 //
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
26 // containing the name of the variable.
27
28 #undef COMPILE_ASSERT
29 #define COMPILE_ASSERT(expr, msg) static_assert(expr, #msg)
30
31 #endif // BASE_MACROS_H_
OLDNEW
« no previous file with comments | « third_party/logging.h ('k') | third_party/numerics/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698