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

Unified Diff: base/callback_forward.h

Issue 1699773002: Extend base::Callback to have a move-only variant (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: msvc work around Created 4 years, 10 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
Index: base/callback_forward.h
diff --git a/base/callback_forward.h b/base/callback_forward.h
index a9a263a50ea77517e6514792843660d6d25435ca..edb1e960445fe7d33ec84e74f534c9708d5a4745 100644
--- a/base/callback_forward.h
+++ b/base/callback_forward.h
@@ -7,7 +7,16 @@
namespace base {
-template <typename Sig>
+namespace internal {
+
+enum class CopyMode {
+ MoveOnly, Copyable,
Nico 2016/02/15 21:47:57 Please give these two a comment explaining what th
tzik 2016/02/16 09:33:32 Added a brief comment.
+};
+
+} // namespace internal
+
+template <typename Signature,
+ internal::CopyMode copy_mode = internal::CopyMode::Copyable>
class Callback;
// Syntactic sugar to make Callback<void()> easier to declare since it
« base/callback.h ('K') | « base/callback.h ('k') | base/callback_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698