OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 MOJO_PUBLIC_SYSTEM_MACROS_H_ | 5 #ifndef MOJO_PUBLIC_C_SYSTEM_MACROS_H_ |
6 #define MOJO_PUBLIC_SYSTEM_MACROS_H_ | 6 #define MOJO_PUBLIC_C_SYSTEM_MACROS_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 // Annotate a variable indicating it's okay if it's unused. | 10 // Annotate a variable indicating it's okay if it's unused. |
11 // Use like: | 11 // Use like: |
12 // int x MOJO_ALLOW_UNUSED = ...; | 12 // int x MOJO_ALLOW_UNUSED = ...; |
13 #if defined(__GNUC__) | 13 #if defined(__GNUC__) |
14 #define MOJO_ALLOW_UNUSED __attribute__((unused)) | 14 #define MOJO_ALLOW_UNUSED __attribute__((unused)) |
15 #else | 15 #else |
16 #define MOJO_ALLOW_UNUSED | 16 #define MOJO_ALLOW_UNUSED |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 type(type&); \ | 73 type(type&); \ |
74 void operator=(type&); \ | 74 void operator=(type&); \ |
75 public: \ | 75 public: \ |
76 operator rvalue_type() { return rvalue_type(this); } \ | 76 operator rvalue_type() { return rvalue_type(this); } \ |
77 type Pass() { return type(rvalue_type(this)); } \ | 77 type Pass() { return type(rvalue_type(this)); } \ |
78 typedef void MoveOnlyTypeForCPP03; \ | 78 typedef void MoveOnlyTypeForCPP03; \ |
79 private: | 79 private: |
80 | 80 |
81 #endif // __cplusplus | 81 #endif // __cplusplus |
82 | 82 |
83 #endif // MOJO_PUBLIC_SYSTEM_MACROS_H_ | 83 #endif // MOJO_PUBLIC_C_SYSTEM_MACROS_H_ |
OLD | NEW |