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

Unified Diff: base/bind_internal_win.h

Issue 1781843003: Remove CallbackParamTraits and CallbackForward (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/callback_internal.h » ('j') | base/callback_internal.h » ('J')
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 2ee12ef214d30f651e2cb2a1dc4b6f2c728c5196..2def8743823da934f1fbdf77868d2b6d94320345 100644
--- a/base/bind_internal_win.h
+++ b/base/bind_internal_win.h
@@ -8,6 +8,8 @@
#ifndef BASE_BIND_INTERNAL_WIN_H_
#define BASE_BIND_INTERNAL_WIN_H_
+#include <utility>
+
#include "build/build_config.h"
// In the x64 architecture in Windows, __fastcall, __stdcall, etc, are all
@@ -33,8 +35,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:
@@ -53,8 +56,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 | « no previous file | base/callback_internal.h » ('j') | base/callback_internal.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698