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

Unified Diff: base/move.h

Issue 599313003: Add nullptr support to scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nullptr: addtestsforconversion Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/memory/scoped_ptr_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/move.h
diff --git a/base/move.h b/base/move.h
index 1c67155be1c72b8d1267dda558180ba6eea10510..0578cc889c979264cf3ff5840fb007e0958e6e3d 100644
--- a/base/move.h
+++ b/base/move.h
@@ -215,4 +215,13 @@
typedef void MoveOnlyTypeForCPP03; \
private:
+#define MOVE_ONLY_TYPE_FOR_CPP_03_WITH_MOVE_CONSTRUCTOR(type) \
+ private: \
+ type(type&); \
+ void operator=(type&); \
+ public: \
+ typedef void MoveOnlyTypeForCPP03; \
+ type&& Pass() { return static_cast<type&&>(*this); } \
jamesr 2014/09/26 20:22:45 no, this is not something we should add as a gener
danakj 2014/09/26 20:57:52 Why? It's only useful if they also add a T&& const
+ private:
+
#endif // BASE_MOVE_H_
« no previous file with comments | « base/memory/scoped_ptr_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698