diff options
author | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-24 02:02:17 +0000 |
---|---|---|
committer | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-24 02:02:17 +0000 |
commit | c18b1056be790c55f10e407a1f6a3706bff7df03 (patch) | |
tree | 7ed333791fc8dfeaef29c07307e8efcfa1b44fba /base/bind_internal_win.h | |
parent | b2e900f755ea4e66b5f41413716ecb55720e354d (diff) | |
download | chromium_src-c18b1056be790c55f10e407a1f6a3706bff7df03.zip chromium_src-c18b1056be790c55f10e407a1f6a3706bff7df03.tar.gz chromium_src-c18b1056be790c55f10e407a1f6a3706bff7df03.tar.bz2 |
Callback support for unbound reference and array arguments.
Because the callback object uses const An& for the type of the Run() function in argument forwarding, the code breaks for An=T& or An=T[]. This CL adds in code to modify the parameter type to remove duplicate references, and other fun.
BUG=35223
TEST=new unittests
Review URL: http://codereview.chromium.org/6718021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79239 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/bind_internal_win.h')
-rw-r--r-- | base/bind_internal_win.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/base/bind_internal_win.h b/base/bind_internal_win.h index dab8d51..976a4d7 100644 --- a/base/bind_internal_win.h +++ b/base/bind_internal_win.h @@ -3,6 +3,7 @@ // DO NOT EDIT BY HAND!!! + // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -39,6 +40,8 @@ template <typename R, typename X1> struct FunctionTraits<R(__stdcall *)(X1)> { typedef R (*NormalizedSig)(X1); typedef false_type IsMethod; + // Target type for each bound parameter. + typedef X1 B1; }; // __fastcall Function: Arity 1. @@ -46,6 +49,8 @@ template <typename R, typename X1> struct FunctionTraits<R(__fastcall *)(X1)> { typedef R (*NormalizedSig)(X1); typedef false_type IsMethod; + // Target type for each bound parameter. + typedef X1 B1; }; // __stdcall Function: Arity 2. @@ -53,6 +58,9 @@ template <typename R, typename X1, typename X2> struct FunctionTraits<R(__stdcall *)(X1, X2)> { typedef R (*NormalizedSig)(X1, X2); typedef false_type IsMethod; + // Target type for each bound parameter. + typedef X1 B1; + typedef X2 B2; }; // __fastcall Function: Arity 2. @@ -60,6 +68,9 @@ template <typename R, typename X1, typename X2> struct FunctionTraits<R(__fastcall *)(X1, X2)> { typedef R (*NormalizedSig)(X1, X2); typedef false_type IsMethod; + // Target type for each bound parameter. + typedef X1 B1; + typedef X2 B2; }; // __stdcall Function: Arity 3. @@ -67,6 +78,10 @@ template <typename R, typename X1, typename X2, typename X3> struct FunctionTraits<R(__stdcall *)(X1, X2, X3)> { typedef R (*NormalizedSig)(X1, X2, X3); typedef false_type IsMethod; + // Target type for each bound parameter. + typedef X1 B1; + typedef X2 B2; + typedef X3 B3; }; // __fastcall Function: Arity 3. @@ -74,6 +89,10 @@ template <typename R, typename X1, typename X2, typename X3> struct FunctionTraits<R(__fastcall *)(X1, X2, X3)> { typedef R (*NormalizedSig)(X1, X2, X3); typedef false_type IsMethod; + // Target type for each bound parameter. + typedef X1 B1; + typedef X2 B2; + typedef X3 B3; }; // __stdcall Function: Arity 4. @@ -81,6 +100,11 @@ template <typename R, typename X1, typename X2, typename X3, typename X4> struct FunctionTraits<R(__stdcall *)(X1, X2, X3, X4)> { typedef R (*NormalizedSig)(X1, X2, X3, X4); typedef false_type IsMethod; + // Target type for each bound parameter. + typedef X1 B1; + typedef X2 B2; + typedef X3 B3; + typedef X4 B4; }; // __fastcall Function: Arity 4. @@ -88,6 +112,11 @@ template <typename R, typename X1, typename X2, typename X3, typename X4> struct FunctionTraits<R(__fastcall *)(X1, X2, X3, X4)> { typedef R (*NormalizedSig)(X1, X2, X3, X4); typedef false_type IsMethod; + // Target type for each bound parameter. + typedef X1 B1; + typedef X2 B2; + typedef X3 B3; + typedef X4 B4; }; // __stdcall Function: Arity 5. @@ -96,6 +125,12 @@ template <typename R, typename X1, typename X2, typename X3, typename X4, struct FunctionTraits<R(__stdcall *)(X1, X2, X3, X4, X5)> { typedef R (*NormalizedSig)(X1, X2, X3, X4, X5); typedef false_type IsMethod; + // Target type for each bound parameter. + typedef X1 B1; + typedef X2 B2; + typedef X3 B3; + typedef X4 B4; + typedef X5 B5; }; // __fastcall Function: Arity 5. @@ -104,6 +139,12 @@ template <typename R, typename X1, typename X2, typename X3, typename X4, struct FunctionTraits<R(__fastcall *)(X1, X2, X3, X4, X5)> { typedef R (*NormalizedSig)(X1, X2, X3, X4, X5); typedef false_type IsMethod; + // Target type for each bound parameter. + typedef X1 B1; + typedef X2 B2; + typedef X3 B3; + typedef X4 B4; + typedef X5 B5; }; // __stdcall Function: Arity 6. @@ -112,6 +153,13 @@ template <typename R, typename X1, typename X2, typename X3, typename X4, struct FunctionTraits<R(__stdcall *)(X1, X2, X3, X4, X5, X6)> { typedef R (*NormalizedSig)(X1, X2, X3, X4, X5, X6); typedef false_type IsMethod; + // Target type for each bound parameter. + typedef X1 B1; + typedef X2 B2; + typedef X3 B3; + typedef X4 B4; + typedef X5 B5; + typedef X6 B6; }; // __fastcall Function: Arity 6. @@ -120,6 +168,13 @@ template <typename R, typename X1, typename X2, typename X3, typename X4, struct FunctionTraits<R(__fastcall *)(X1, X2, X3, X4, X5, X6)> { typedef R (*NormalizedSig)(X1, X2, X3, X4, X5, X6); typedef false_type IsMethod; + // Target type for each bound parameter. + typedef X1 B1; + typedef X2 B2; + typedef X3 B3; + typedef X4 B4; + typedef X5 B5; + typedef X6 B6; }; } // namespace internal |