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

Unified Diff: base/callback_internal.h

Issue 10344012: For types that support Pass(), e.g. scoped_ptr and friends, use Passed in PostTaskAndReplyWithResul… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 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 | base/task_runner_util.h » ('j') | 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 244504bc506088d351286209ec5cd028a876ee8e..92ea80abfb0ee7456398d8260da428964bc64b6e 100644
--- a/base/callback_internal.h
+++ b/base/callback_internal.h
@@ -166,6 +166,11 @@ struct CallbackParamTraits<ScopedVector<T> > {
// In C++11, std::forward would replace all uses of this function. However, it
// is impossible to implement a general std::forward with C++11 due to a lack
// of rvalue references.
+//
+// In addition to Callback/Bind, this is used by PostTaskAndReplyWithResult to
+// simulate std::forward() and forward the result of one Callback as a
+// parameter to another callback. This is to support Callbacks that return
+// the movable-but-not-copyable types whitelisted above.
template <typename T>
T& CallbackForward(T& t) { return t; }
« no previous file with comments | « no previous file | base/task_runner_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698