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

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: Updated file names per review with davemoore@ 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
« no previous file with comments | « mojo/public/system/core.h ('k') | no next file » | 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 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 // A macro to disallow the copy constructor and operator= functions
25 // This should be used in the private: declarations for a class
26 #define MOJO_DISALLOW_COPY_AND_ASSIGN(TypeName) \
27 TypeName(const TypeName&); \
viettrungluu 2013/10/10 20:42:38 Nit: remove extra spaces before \ (or add some to
28 void operator=(const TypeName&)
29
30 // Used to assert things at compile time.
31 namespace internal { template <bool> struct CompileAssert {}; }
32 #define MOJO_COMPILE_ASSERT(expr, msg) \
33 typedef internal::CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1]
34
35 } // namespace mojo
36
37 #endif // __cplusplus
38
39 #endif // MOJO_PUBLIC_SYSTEM_MACROS_H_
OLDNEW
« no previous file with comments | « mojo/public/system/core.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698