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

Unified Diff: base/bind_internal_win.h

Issue 1498973002: WIP: base::Bind for rvalue references. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « base/bind_internal.h ('k') | base/bind_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/bind_internal_win.h
diff --git a/base/bind_internal_win.h b/base/bind_internal_win.h
index c3f7477668e3e9d232c0541360f66aac8e0e036f..2b8729f16c02892b01b045ab310458f515469a79 100644
--- a/base/bind_internal_win.h
+++ b/base/bind_internal_win.h
@@ -29,8 +29,9 @@ class RunnableAdapter<R(__stdcall *)(Args...)> {
: function_(function) {
}
- R Run(typename CallbackParamTraits<Args>::ForwardType... args) {
- return function_(args...);
+ template <typename... RunArgs>
+ R Run(RunArgs&&... args) {
+ return function_(std::forward<RunArgs>(args)...);
}
private:
@@ -47,8 +48,9 @@ class RunnableAdapter<R(__fastcall *)(Args...)> {
: function_(function) {
}
- R Run(typename CallbackParamTraits<Args>::ForwardType... args) {
- return function_(args...);
+ template <typename... RunArgs>
+ R Run(RunArgs&&... args) {
+ return function_(std::forward<RunArgs>(args)...);
}
private:
« no previous file with comments | « base/bind_internal.h ('k') | base/bind_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698