1 $$ This is a pump file for generating file templates. Pump is a python
2 $$ script that is part of the Google Test suite of utilities. Description
5 $$ http://code.google.com/p/googletest/wiki/PumpManual
10 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
11 // Use of this source code is governed by a BSD-style license that can be
12 // found in the LICENSE file.
14 // Specializations of FunctionTraits<> for Windows specific calling
15 // conventions. Please see base/bind_internal.h for more info.
17 #ifndef BASE_BIND_INTERNAL_WIN_H_
18 #define BASE_BIND_INTERNAL_WIN_H_
21 // In the x64 architecture in Windows, __fastcall, __stdcall, etc, are all
22 // the same as __cdecl which would turn the following specializations into
23 // multiple definitions.
24 #if !defined(ARCH_CPU_X86_64)
29 template <typename Sig>
30 struct FunctionTraits;
32 $range ARITY 0..MAX_ARITY
36 // __stdcall Function: Arity $(ARITY).
37 template <typename R[[]]
38 $if ARITY > 0[[, ]] $for ARG , [[typename X$(ARG)]]>
39 struct FunctionTraits<R(__stdcall *)($for ARG , [[X$(ARG)]])> {
40 typedef R (*NormalizedSig)($for ARG , [[X$(ARG)]]);
41 typedef false_type IsMethod;
47 // Target type for each bound parameter.
50 typedef X$(ARG) B$(ARG);
56 // __fastcall Function: Arity $(ARITY).
57 template <typename R[[]]
58 $if ARITY > 0[[, ]] $for ARG , [[typename X$(ARG)]]>
59 struct FunctionTraits<R(__fastcall *)($for ARG , [[X$(ARG)]])> {
60 typedef R (*NormalizedSig)($for ARG , [[X$(ARG)]]);
61 typedef false_type IsMethod;
67 // Target type for each bound parameter.
70 typedef X$(ARG) B$(ARG);
78 } // namespace internal
81 #endif // !defined(ARCH_CPU_X86_64)
83 #endif // BASE_BIND_INTERNAL_WIN_H_