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

Unified Diff: base/tuple.h

Issue 1696093002: Support smart pointers in base::DispatchToMethod (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | storage/browser/fileapi/task_runner_bound_observer_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/tuple.h
diff --git a/base/tuple.h b/base/tuple.h
index e73dd49c7c09d5bf9f0dd753b38e6a9eb60be072..d07d38c6031726f28308ed14648b6308e3805cb0 100644
--- a/base/tuple.h
+++ b/base/tuple.h
@@ -196,7 +196,7 @@ inline Tuple<Ts&...> MakeRefTuple(Ts&... arg) {
// Non-Static Dispatchers with no out params.
template <typename ObjT, typename Method, typename... Ts, size_t... Ns>
-inline void DispatchToMethodImpl(ObjT* obj,
+inline void DispatchToMethodImpl(const ObjT& obj,
Method method,
const Tuple<Ts...>& arg,
IndexSequence<Ns...>) {
@@ -204,7 +204,7 @@ inline void DispatchToMethodImpl(ObjT* obj,
}
template <typename ObjT, typename Method, typename... Ts>
-inline void DispatchToMethod(ObjT* obj,
+inline void DispatchToMethod(const ObjT& obj,
Method method,
const Tuple<Ts...>& arg) {
DispatchToMethodImpl(obj, method, arg, MakeIndexSequence<sizeof...(Ts)>());
@@ -232,7 +232,7 @@ template <typename ObjT,
typename... OutTs,
size_t... InNs,
size_t... OutNs>
-inline void DispatchToMethodImpl(ObjT* obj,
+inline void DispatchToMethodImpl(const ObjT& obj,
Method method,
const Tuple<InTs...>& in,
Tuple<OutTs...>* out,
@@ -243,7 +243,7 @@ inline void DispatchToMethodImpl(ObjT* obj,
}
template <typename ObjT, typename Method, typename... InTs, typename... OutTs>
-inline void DispatchToMethod(ObjT* obj,
+inline void DispatchToMethod(const ObjT& obj,
Method method,
const Tuple<InTs...>& in,
Tuple<OutTs...>* out) {
« no previous file with comments | « no previous file | storage/browser/fileapi/task_runner_bound_observer_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698