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

Unified Diff: base/callback_internal.h

Issue 1644603003: Do Perfect Forwarding from base::Bind to BindState storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« base/bind_internal.h ('K') | « base/bind_internal.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/callback_internal.h
diff --git a/base/callback_internal.h b/base/callback_internal.h
index e4e538ff15c2d0dfe239bc5d8b17fe411c59926e..79b0895fb6a7fa88e644379b72c58158f59ac4a9 100644
--- a/base/callback_internal.h
+++ b/base/callback_internal.h
@@ -149,7 +149,6 @@ struct CallbackParamTraits
template <typename T>
struct CallbackParamTraitsForNonMoveOnlyType {
using ForwardType = const T&;
- using StorageType = T;
};
// The Storage should almost be impossible to trigger unless someone manually
@@ -160,7 +159,6 @@ struct CallbackParamTraitsForNonMoveOnlyType {
template <typename T>
struct CallbackParamTraitsForNonMoveOnlyType<T&> {
danakj 2016/01/28 23:01:00 Do we still need this specialization?
tzik 2016/02/01 15:00:16 Done.
using ForwardType = T&;
- using StorageType = T;
};
// Note that for array types, we implicitly add a const in the conversion. This
@@ -171,14 +169,12 @@ struct CallbackParamTraitsForNonMoveOnlyType<T&> {
template <typename T, size_t n>
struct CallbackParamTraitsForNonMoveOnlyType<T[n]> {
using ForwardType = const T*;
- using StorageType = const T*;
};
// See comment for CallbackParamTraits<T[n]>.
template <typename T>
struct CallbackParamTraitsForNonMoveOnlyType<T[]> {
using ForwardType = const T*;
- using StorageType = const T*;
};
// Parameter traits for movable-but-not-copyable scopers.
@@ -197,7 +193,6 @@ struct CallbackParamTraitsForNonMoveOnlyType<T[]> {
template <typename T>
struct CallbackParamTraitsForMoveOnlyType {
using ForwardType = T;
- using StorageType = T;
};
// CallbackForward() is a very limited simulation of C++11's std::forward()
« base/bind_internal.h ('K') | « base/bind_internal.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698