OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 BASE_MOVE_H_ | 5 #ifndef BASE_MOVE_H_ |
6 #define BASE_MOVE_H_ | 6 #define BASE_MOVE_H_ |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 | 221 |
222 #define MOVE_ONLY_TYPE_WITH_MOVE_CONSTRUCTOR_FOR_CPP_03(type) \ | 222 #define MOVE_ONLY_TYPE_WITH_MOVE_CONSTRUCTOR_FOR_CPP_03(type) \ |
223 private: \ | 223 private: \ |
224 type(const type&); \ | 224 type(const type&); \ |
225 void operator=(const type&); \ | 225 void operator=(const type&); \ |
226 public: \ | 226 public: \ |
227 type&& Pass() WARN_UNUSED_RESULT { return std::move(*this); } \ | 227 type&& Pass() WARN_UNUSED_RESULT { return std::move(*this); } \ |
228 typedef void MoveOnlyTypeForCPP03; \ | 228 typedef void MoveOnlyTypeForCPP03; \ |
229 private: | 229 private: |
230 | 230 |
231 #define TYPE_WITH_MOVE_CONSTRUCTOR_FOR_CPP_03(type) \ | |
232 public: \ | |
233 type&& Pass() WARN_UNUSED_RESULT { return std::move(*this); } \ | |
234 private: | |
235 | |
236 #endif // BASE_MOVE_H_ | 231 #endif // BASE_MOVE_H_ |
OLD | NEW |