@@ -117,7 +117,7 @@ enum op_id : int;
117
117
enum op_type : int ;
118
118
struct undefined_t ;
119
119
template <op_id id, op_type ot, typename L = undefined_t , typename R = undefined_t > struct op_ ;
120
- template < size_t NumArgs> void keep_alive_impl (size_t Nurse, size_t Patient, function_call_impl<NumArgs> &call, handle ret);
120
+ void keep_alive_impl (size_t Nurse, size_t Patient, function_call &call, handle ret);
121
121
template <typename ... Args> struct process_attributes ;
122
122
123
123
template <typename T>
@@ -966,8 +966,8 @@ template <typename T> struct process_attribute_default {
966
966
// / Default implementation: do nothing
967
967
static void init (const T &, function_record *) { }
968
968
static void init (const T &, type_record *) { }
969
- template < size_t NumArgs> static void precall (function_call_impl<NumArgs> &) { }
970
- template < size_t NumArgs> static void postcall (function_call_impl<NumArgs> &, handle) { }
969
+ static void precall (function_call &) { }
970
+ static void postcall (function_call &, handle) { }
971
971
};
972
972
973
973
// / Process an attribute specifying the function's name
@@ -1107,14 +1107,14 @@ struct process_attribute<call_guard<Ts...>> : process_attribute_default<call_gua
1107
1107
* otherwise
1108
1108
*/
1109
1109
template <size_t Nurse, size_t Patient> struct process_attribute <keep_alive<Nurse, Patient>> : public process_attribute_default<keep_alive<Nurse, Patient>> {
1110
- template <size_t NumArgs, size_t N = Nurse, size_t P = Patient, enable_if_t <N != 0 && P != 0 , int > = 0 >
1111
- static void precall (function_call_impl<NumArgs> &call) { keep_alive_impl (Nurse, Patient, call, handle ()); }
1112
- template <size_t NumArgs, size_t N = Nurse, size_t P = Patient, enable_if_t <N != 0 && P != 0 , int > = 0 >
1113
- static void postcall (function_call_impl<NumArgs> &, handle) { }
1114
- template <size_t NumArgs, size_t N = Nurse, size_t P = Patient, enable_if_t <N == 0 || P == 0 , int > = 0 >
1115
- static void precall (function_call_impl<NumArgs> &) { }
1116
- template <size_t NumArgs, size_t N = Nurse, size_t P = Patient, enable_if_t <N == 0 || P == 0 , int > = 0 >
1117
- static void postcall (function_call_impl<NumArgs> &call, handle ret) { keep_alive_impl (Nurse, Patient, call, ret); }
1110
+ template <size_t N = Nurse, size_t P = Patient, enable_if_t <N != 0 && P != 0 , int > = 0 >
1111
+ static void precall (function_call &call) { keep_alive_impl (Nurse, Patient, call, handle ()); }
1112
+ template <size_t N = Nurse, size_t P = Patient, enable_if_t <N != 0 && P != 0 , int > = 0 >
1113
+ static void postcall (function_call &, handle) { }
1114
+ template <size_t N = Nurse, size_t P = Patient, enable_if_t <N == 0 || P == 0 , int > = 0 >
1115
+ static void precall (function_call &) { }
1116
+ template <size_t N = Nurse, size_t P = Patient, enable_if_t <N == 0 || P == 0 , int > = 0 >
1117
+ static void postcall (function_call &call, handle ret) { keep_alive_impl (Nurse, Patient, call, ret); }
1118
1118
};
1119
1119
1120
1120
// / Recursively iterate over variadic template arguments
@@ -1127,13 +1127,11 @@ template <typename... Args> struct process_attributes {
1127
1127
int unused[] = { 0 , (process_attribute<typename std::decay<Args>::type>::init (args, r), 0 ) ... };
1128
1128
ignore_unused (unused);
1129
1129
}
1130
- template <size_t NumArgs>
1131
- static void precall (function_call_impl<NumArgs> &call) {
1130
+ static void precall (function_call &call) {
1132
1131
int unused[] = { 0 , (process_attribute<typename std::decay<Args>::type>::precall (call), 0 ) ... };
1133
1132
ignore_unused (unused);
1134
1133
}
1135
- template <size_t NumArgs>
1136
- static void postcall (function_call_impl<NumArgs> &call, handle fn_ret) {
1134
+ static void postcall (function_call &call, handle fn_ret) {
1137
1135
int unused[] = { 0 , (process_attribute<typename std::decay<Args>::type>::postcall (call, fn_ret), 0 ) ... };
1138
1136
ignore_unused (unused);
1139
1137
}
0 commit comments