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

Unified Diff: base/move.h

Issue 1061073004: Make deleted constructors take a const parameter in move-only type macro. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | 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 06f3f323723f68126542d3db3fed49487cb73bc6..93ee9f9dc3699a65a3e5a6a77c3453d42a57d0a4 100644
--- a/base/move.h
+++ b/base/move.h
@@ -219,8 +219,8 @@
#define MOVE_ONLY_TYPE_WITH_MOVE_CONSTRUCTOR_FOR_CPP_03(type) \
private: \
- type(type&); \
- void operator=(type&); \
+ type(const type&); \
mgraczyk 2015/04/07 01:10:31 This allows move-only types to be used in STL cont
Nico 2015/04/07 01:36:47 Only if your STL knows about move-only types, righ
mgraczyk 2015/04/07 05:32:59 It may or may not work after this change if the li
+ void operator=(const type&); \
public: \
type&& Pass() WARN_UNUSED_RESULT { return static_cast<type&&>(*this); } \
typedef void MoveOnlyTypeForCPP03; \
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698