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

Side by Side Diff: mojo/public/system/macros.h

Issue 23913008: C++ bindings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Stop building src/mojo on iOS Created 7 years, 2 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 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 #ifndef MOJO_PUBLIC_SYSTEM_MACROS_H_
6 #define MOJO_PUBLIC_SYSTEM_MACROS_H_
7
8 #ifdef __cplusplus
9
10 namespace mojo {
11
12 // Annotate a virtual method indicating it must be overriding a virtual
13 // method in the parent class.
14 // Use like:
15 // virtual void foo() OVERRIDE;
16 #if defined(_MSC_VER)
17 #define MOJO_OVERRIDE override
18 #elif defined(__clang__)
19 #define MOJO_OVERRIDE override
20 #else
21 #define MOJO_OVERRIDE
22 #endif
23
24 // Used to assert things at compile time.
25 namespace internal { template <bool> struct CompileAssert {}; }
26 #define MOJO_COMPILE_ASSERT(expr, msg) \
27 typedef internal::CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1]
28
29 } // namespace mojo
30
31 #endif // __cplusplus
32
33 #endif // MOJO_PUBLIC_SYSTEM_MACROS_H_
OLDNEW
« mojo/public/bindings/lib/buffer.cc ('K') | « mojo/public/system/core.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698