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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 private: \ | 56 private: \ |
57 type(const type&) = delete; \ | 57 type(const type&) = delete; \ |
58 void operator=(const type&) = delete; \ | 58 void operator=(const type&) = delete; \ |
59 \ | 59 \ |
60 public: \ | 60 public: \ |
61 type&& Pass() WARN_UNUSED_RESULT { return std::move(*this); } \ | 61 type&& Pass() WARN_UNUSED_RESULT { return std::move(*this); } \ |
62 typedef void MoveOnlyTypeForCPP03; \ | 62 typedef void MoveOnlyTypeForCPP03; \ |
63 \ | 63 \ |
64 private: | 64 private: |
65 | 65 |
66 #define TYPE_WITH_MOVE_CONSTRUCTOR_FOR_CPP_03(type) \ | |
67 public: \ | |
68 type&& Pass() WARN_UNUSED_RESULT { return std::move(*this); } \ | |
69 private: | |
70 | |
71 #endif // BASE_MOVE_H_ | 66 #endif // BASE_MOVE_H_ |
OLD | NEW |