1 #ifndef MADNESS_FUNCTION_TRAITS
2 #define MADNESS_FUNCTION_TRAITS
9 template <
typename functionT>
13 template <
typename returnT>
15 static const bool value =
true;
16 static const int arity = 0;
21 template <
typename returnT,
typename arg1T>
23 static const bool value =
true;
24 static const int arity = 1;
30 template <
typename returnT,
typename arg1T,
typename arg2T>
32 static const bool value =
true;
33 static const int arity = 2;
40 template <
typename returnT,
typename arg1T,
typename arg2T,
typename arg3T>
42 static const bool value =
true;
43 static const int arity = 3;
51 template <
typename returnT,
typename arg1T,
typename arg2T,
typename arg3T,
typename arg4T>
53 static const bool value =
true;
54 static const int arity = 4;
63 template <
typename returnT,
typename arg1T,
typename arg2T,
typename arg3T,
typename arg4T,
typename arg5T>
65 static const bool value =
true;
66 static const int arity = 5;
77 template <
typename returnT,
typename arg1T,
typename arg2T,
typename arg3T,
typename arg4T,
typename arg5T,
typename arg6T>
79 static const bool value =
true;
80 static const int arity = 6;
92 template <
typename returnT,
typename arg1T,
typename arg2T,
typename arg3T,
typename arg4T,
typename arg5T,
typename arg6T,
typename arg7T>
94 static const bool value =
true;
95 static const int arity = 7;
107 template <
typename returnT,
typename arg1T,
typename arg2T,
typename arg3T,
typename arg4T,
typename arg5T,
typename arg6T,
typename arg7T,
typename arg8T>
109 static const bool value =
true;
110 static const int arity = 8;
123 template <
typename returnT,
typename arg1T,
typename arg2T,
typename arg3T,
typename arg4T,
typename arg5T,
typename arg6T,
typename arg7T,
typename arg8T,
typename arg9T>
124 struct function_traits<returnT(*)(arg1T,arg2T,arg3T,arg4T,arg5T,arg6T,arg7T,arg8T,arg9T)> {
125 static const bool value =
true;
126 static const int arity = 9;
141 template <
typename memfuncT>
147 template <
typename objT,
typename returnT>
150 static const int arity = 0;
151 static const bool constness =
false;
157 template <
typename objT,
typename returnT,
typename arg1T>
160 static const int arity = 1;
161 static const bool constness =
false;
168 template <
typename objT,
typename returnT,
typename arg1T,
typename arg2T>
171 static const int arity = 2;
172 static const bool constness =
false;
180 template <
typename objT,
typename returnT,
typename arg1T,
typename arg2T,
typename arg3T>
183 static const int arity = 3;
184 static const bool constness =
false;
193 template <
typename objT,
typename returnT,
typename arg1T,
typename arg2T,
typename arg3T,
typename arg4T>
196 static const int arity = 4;
197 static const bool constness =
false;
208 template <
typename objT,
typename returnT,
typename arg1T,
typename arg2T,
typename arg3T,
typename arg4T,
typename arg5T>
211 static const int arity = 5;
212 static const bool constness =
false;
224 template <
typename objT,
typename returnT,
typename arg1T,
typename arg2T,
typename arg3T,
typename arg4T,
typename arg5T,
typename arg6T>
227 static const int arity = 6;
228 static const bool constness =
false;
241 template <
typename objT,
typename returnT,
typename arg1T,
typename arg2T,
typename arg3T,
typename arg4T,
typename arg5T,
typename arg6T,
typename arg7T>
242 struct memfunc_traits<returnT(objT::*)(arg1T,arg2T,arg3T,arg4T,arg5T,arg6T,arg7T)> {
244 static const int arity = 7;
245 static const bool constness =
false;
259 template <
typename objT,
typename returnT,
typename arg1T,
typename arg2T,
typename arg3T,
typename arg4T,
typename arg5T,
typename arg6T,
typename arg7T,
typename arg8T>
260 struct memfunc_traits<returnT(objT::*)(arg1T,arg2T,arg3T,arg4T,arg5T,arg6T,arg7T,arg8T)> {
262 static const int arity = 8;
263 static const bool constness =
false;
278 template <
typename objT,
typename returnT,
typename arg1T,
typename arg2T,
typename arg3T,
typename arg4T,
typename arg5T,
typename arg6T,
typename arg7T,
typename arg8T,
typename arg9T>
279 struct memfunc_traits<returnT(objT::*)(arg1T,arg2T,arg3T,arg4T,arg5T,arg6T,arg7T,arg8T,arg9T)> {
281 static const int arity = 9;
282 static const bool constness =
false;
298 template <
typename objT,
typename returnT>
301 static const int arity = 0;
302 static const bool constness =
true;
308 template <
typename objT,
typename returnT,
typename arg1T>
311 static const int arity = 1;
312 static const bool constness =
true;
319 template <
typename objT,
typename returnT,
typename arg1T,
typename arg2T>
322 static const int arity = 2;
323 static const bool constness =
true;
331 template <
typename objT,
typename returnT,
typename arg1T,
typename arg2T,
typename arg3T>
334 static const int arity = 3;
335 static const bool constness =
true;
345 template <
typename objT,
typename returnT,
typename arg1T,
typename arg2T,
typename arg3T,
typename arg4T>
348 static const int arity = 4;
349 static const bool constness =
true;
361 template <
typename objT,
typename returnT,
typename arg1T,
typename arg2T,
typename arg3T,
typename arg4T,
typename arg5T>
364 static const int arity = 5;
365 static const bool constness =
true;
377 template <
typename objT,
typename returnT,
typename arg1T,
typename arg2T,
typename arg3T,
typename arg4T,
typename arg5T,
typename arg6T>
378 struct memfunc_traits<returnT(objT::*)(arg1T,arg2T,arg3T,arg4T,arg5T,arg6T) const> {
380 static const int arity = 6;
381 static const bool constness =
true;
394 template <
typename objT,
typename returnT,
typename arg1T,
typename arg2T,
typename arg3T,
typename arg4T,
typename arg5T,
typename arg6T,
typename arg7T>
395 struct memfunc_traits<returnT(objT::*)(arg1T,arg2T,arg3T,arg4T,arg5T,arg6T,arg7T) const> {
397 static const int arity = 7;
398 static const bool constness =
true;
413 template <
typename objT,
typename returnT,
typename arg1T,
typename arg2T,
typename arg3T,
typename arg4T,
typename arg5T,
typename arg6T,
typename arg7T,
typename arg8T>
414 struct memfunc_traits<returnT(objT::*)(arg1T,arg2T,arg3T,arg4T,arg5T,arg6T,arg7T,arg8T) const> {
416 static const int arity = 8;
417 static const bool constness =
true;
432 template <
typename objT,
typename returnT,
typename arg1T,
typename arg2T,
typename arg3T,
typename arg4T,
typename arg5T,
typename arg6T,
typename arg7T,
typename arg8T,
typename arg9T>
433 struct memfunc_traits<returnT(objT::*)(arg1T,arg2T,arg3T,arg4T,arg5T,arg6T,arg7T,arg8T,arg9T) const> {
435 static const int arity = 9;
436 static const bool constness =
true;
450 template <
typename fnT,
typename Enabler =
void>
452 typedef typename fnT::result_type
type;
455 template <
typename fnT>
460 template <
typename fnT>
arg7T arg7_type
Definition: function_traits_bits.h:134
arg8T arg8_type
Definition: function_traits_bits.h:427
arg6T arg6_type
Definition: function_traits_bits.h:389
returnT result_type
Definition: function_traits_bits.h:186
arg7T arg7_type
Definition: function_traits_bits.h:103
arg2T arg2_type
Definition: function_traits_bits.h:98
arg3T arg3_type
Definition: function_traits_bits.h:370
arg9T arg9_type
Definition: function_traits_bits.h:136
Definition: function_traits_bits.h:451
arg6T arg6_type
Definition: function_traits_bits.h:271
arg3T arg3_type
Definition: function_traits_bits.h:340
arg1T arg1_type
Definition: function_traits_bits.h:215
arg7T arg7_type
Definition: function_traits_bits.h:407
arg5T arg5_type
Definition: function_traits_bits.h:424
returnT result_type
Definition: function_traits_bits.h:367
arg6T arg6_type
Definition: function_traits_bits.h:236
arg2T arg2_type
Definition: function_traits_bits.h:46
arg9T arg9_type
Definition: function_traits_bits.h:447
arg2T arg2_type
Definition: function_traits_bits.h:113
arg4T arg4_type
Definition: function_traits_bits.h:442
objT obj_type
Definition: function_traits_bits.h:229
arg6T arg6_type
Definition: function_traits_bits.h:102
arg5T arg5_type
Definition: function_traits_bits.h:270
returnT result_type
Definition: function_traits_bits.h:163
arg2T arg2_type
Definition: function_traits_bits.h:232
arg2T arg2_type
Definition: function_traits_bits.h:83
arg3T arg3_type
Definition: function_traits_bits.h:84
arg2T arg2_type
Definition: function_traits_bits.h:339
arg3T arg3_type
Definition: function_traits_bits.h:58
arg5T arg5_type
Definition: function_traits_bits.h:86
arg1T arg1_type
Definition: function_traits_bits.h:368
arg7T arg7_type
Definition: function_traits_bits.h:118
arg1T arg1_type
Definition: function_traits_bits.h:187
arg1T arg1_type
Definition: function_traits_bits.h:200
arg3T arg3_type
Definition: function_traits_bits.h:233
arg1T arg1_type
Definition: function_traits_bits.h:82
arg6T arg6_type
Definition: function_traits_bits.h:87
returnT result_type
Definition: function_traits_bits.h:383
arg3T arg3_type
Definition: function_traits_bits.h:130
returnT result_type
Definition: function_traits_bits.h:96
returnT result_type
Definition: function_traits_bits.h:127
arg2T arg2_type
Definition: function_traits_bits.h:129
arg4T arg4_type
Definition: function_traits_bits.h:85
arg2T arg2_type
Definition: function_traits_bits.h:249
arg1T arg1_type
Definition: function_traits_bits.h:97
arg5T arg5_type
Definition: function_traits_bits.h:72
arg8T arg8_type
Definition: function_traits_bits.h:119
returnT result_type
Definition: function_traits_bits.h:55
arg1T arg1_type
Definition: function_traits_bits.h:266
Function traits in the spirt of boost function traits.
Definition: function_traits_bits.h:10
returnT result_type
Definition: function_traits_bits.h:81
arg1T arg1_type
Definition: function_traits_bits.h:231
returnT result_type
Definition: function_traits_bits.h:25
objT obj_type
Definition: function_traits_bits.h:366
returnT result_type
Definition: function_traits_bits.h:17
returnT result_type
Definition: function_traits_bits.h:214
objT obj_type
Definition: function_traits_bits.h:213
arg2T arg2_type
Definition: function_traits_bits.h:201
arg1T arg1_type
Definition: function_traits_bits.h:352
arg3T arg3_type
Definition: function_traits_bits.h:422
arg2T arg2_type
Definition: function_traits_bits.h:353
arg2T arg2_type
Definition: function_traits_bits.h:327
arg1T arg1_type
Definition: function_traits_bits.h:164
arg6T arg6_type
Definition: function_traits_bits.h:425
arg3T arg3_type
Definition: function_traits_bits.h:441
arg3T arg3_type
Definition: function_traits_bits.h:189
arg4T arg4_type
Definition: function_traits_bits.h:203
arg2T arg2_type
Definition: function_traits_bits.h:286
arg1T arg1_type
Definition: function_traits_bits.h:326
arg3T arg3_type
Definition: function_traits_bits.h:354
arg1T arg1_type
Definition: function_traits_bits.h:285
arg4T arg4_type
Definition: function_traits_bits.h:355
arg2T arg2_type
Definition: function_traits_bits.h:216
arg1T arg1_type
Definition: function_traits_bits.h:384
arg6T arg6_type
Definition: function_traits_bits.h:444
arg4T arg4_type
Definition: function_traits_bits.h:251
arg5T arg5_type
Definition: function_traits_bits.h:235
arg2T arg2_type
Definition: function_traits_bits.h:440
arg5T arg5_type
Definition: function_traits_bits.h:252
arg2T arg2_type
Definition: function_traits_bits.h:176
arg1T arg1_type
Definition: function_traits_bits.h:338
returnT result_type
Definition: function_traits_bits.h:438
arg4T arg4_type
Definition: function_traits_bits.h:288
bool_constant< false > false_type
Definition: gtest-port.h:1617
arg5T arg5_type
Definition: function_traits_bits.h:443
returnT result_type
Definition: function_traits_bits.h:199
objT obj_type
Definition: function_traits_bits.h:313
returnT result_type
Definition: function_traits_bits.h:419
arg2T arg2_type
Definition: function_traits_bits.h:267
arg8T arg8_type
Definition: function_traits_bits.h:273
arg3T arg3_type
Definition: function_traits_bits.h:386
arg5T arg5_type
Definition: function_traits_bits.h:219
arg6T arg6_type
Definition: function_traits_bits.h:406
arg5T arg5_type
Definition: function_traits_bits.h:289
objT obj_type
Definition: function_traits_bits.h:418
arg4T arg4_type
Definition: function_traits_bits.h:234
arg3T arg3_type
Definition: function_traits_bits.h:250
arg7T arg7_type
Definition: function_traits_bits.h:445
arg4T arg4_type
Definition: function_traits_bits.h:387
arg2T arg2_type
Definition: function_traits_bits.h:421
objT obj_type
Definition: function_traits_bits.h:437
arg3T arg3_type
Definition: function_traits_bits.h:287
returnT result_type
Definition: function_traits_bits.h:400
objT obj_type
Definition: function_traits_bits.h:264
arg3T arg3_type
Definition: function_traits_bits.h:403
arg1T arg1_type
Definition: function_traits_bits.h:315
arg3T arg3_type
Definition: function_traits_bits.h:217
arg6T arg6_type
Definition: function_traits_bits.h:117
memfunc_traits< fnT >::result_type type
Definition: function_traits_bits.h:462
arg2T arg2_type
Definition: function_traits_bits.h:36
arg4T arg4_type
Definition: function_traits_bits.h:59
arg8T arg8_type
Definition: function_traits_bits.h:135
arg4T arg4_type
Definition: function_traits_bits.h:269
arg1T arg1_type
Definition: function_traits_bits.h:128
arg4T arg4_type
Definition: function_traits_bits.h:100
Member function traits in the spirt of boost function traits.
Definition: function_traits_bits.h:142
arg7T arg7_type
Definition: function_traits_bits.h:272
returnT result_type
Definition: function_traits_bits.h:314
static const bool value
Definition: function_traits_bits.h:143
returnT result_type
Definition: function_traits_bits.h:247
arg1T arg1_type
Definition: function_traits_bits.h:68
returnT result_type
Definition: function_traits_bits.h:34
arg5T arg5_type
Definition: function_traits_bits.h:132
arg1T arg1_type
Definition: function_traits_bits.h:420
arg2T arg2_type
Definition: function_traits_bits.h:69
objT obj_type
Definition: function_traits_bits.h:399
objT obj_type
Definition: function_traits_bits.h:152
arg9T arg9_type
Definition: function_traits_bits.h:293
arg1T arg1_type
Definition: function_traits_bits.h:112
arg1T arg1_type
Definition: function_traits_bits.h:45
returnT result_type
Definition: function_traits_bits.h:44
arg5T arg5_type
Definition: function_traits_bits.h:101
enable_if_c from Boost for conditionally instantiating templates based on type
Definition: enable_if.h:46
arg4T arg4_type
Definition: function_traits_bits.h:131
objT obj_type
Definition: function_traits_bits.h:382
arg4T arg4_type
Definition: function_traits_bits.h:423
arg2T arg2_type
Definition: function_traits_bits.h:188
arg5T arg5_type
Definition: function_traits_bits.h:372
arg4T arg4_type
Definition: function_traits_bits.h:115
arg5T arg5_type
Definition: function_traits_bits.h:116
objT obj_type
Definition: function_traits_bits.h:303
objT obj_type
Definition: function_traits_bits.h:350
arg2T arg2_type
Definition: function_traits_bits.h:369
arg1T arg1_type
Definition: function_traits_bits.h:35
objT obj_type
Definition: function_traits_bits.h:198
arg7T arg7_type
Definition: function_traits_bits.h:291
arg3T arg3_type
Definition: function_traits_bits.h:202
arg7T arg7_type
Definition: function_traits_bits.h:426
returnT result_type
Definition: function_traits_bits.h:111
arg1T arg1_type
Definition: function_traits_bits.h:56
Definition: function_traits_bits.h:7
arg3T arg3_type
Definition: function_traits_bits.h:268
arg8T arg8_type
Definition: function_traits_bits.h:446
objT obj_type
Definition: function_traits_bits.h:185
arg6T arg6_type
Definition: function_traits_bits.h:133
returnT result_type
Definition: function_traits_bits.h:265
objT obj_type
Definition: function_traits_bits.h:246
arg1T arg1_type
Definition: function_traits_bits.h:439
objT obj_type
Definition: function_traits_bits.h:336
returnT result_type
Definition: function_traits_bits.h:67
arg6T arg6_type
Definition: function_traits_bits.h:253
fnT::result_type type
Definition: function_traits_bits.h:452
arg6T arg6_type
Definition: function_traits_bits.h:290
arg4T arg4_type
Definition: function_traits_bits.h:371
arg5T arg5_type
Definition: function_traits_bits.h:405
returnT result_type
Definition: function_traits_bits.h:337
arg4T arg4_type
Definition: function_traits_bits.h:218
returnT result_type
Definition: function_traits_bits.h:230
returnT result_type
Definition: function_traits_bits.h:284
arg4T arg4_type
Definition: function_traits_bits.h:404
arg7T arg7_type
Definition: function_traits_bits.h:254
objT obj_type
Definition: function_traits_bits.h:173
arg2T arg2_type
Definition: function_traits_bits.h:402
returnT result_type
Definition: function_traits_bits.h:174
function_traits< fnT >::result_type type
Definition: function_traits_bits.h:457
returnT result_type
Definition: function_traits_bits.h:153
Holds machinery to set up Functions/FuncImpls using various Factories and Interfaces.
Definition: chem/atomutil.cc:45
objT obj_type
Definition: function_traits_bits.h:283
arg2T arg2_type
Definition: function_traits_bits.h:57
arg3T arg3_type
Definition: function_traits_bits.h:114
arg1T arg1_type
Definition: function_traits_bits.h:175
arg8T arg8_type
Definition: function_traits_bits.h:292
objT obj_type
Definition: function_traits_bits.h:162
arg2T arg2_type
Definition: function_traits_bits.h:385
arg3T arg3_type
Definition: function_traits_bits.h:70
returnT result_type
Definition: function_traits_bits.h:325
arg5T arg5_type
Definition: function_traits_bits.h:388
arg1T arg1_type
Definition: function_traits_bits.h:401
returnT result_type
Definition: function_traits_bits.h:351
returnT result_type
Definition: function_traits_bits.h:304
arg4T arg4_type
Definition: function_traits_bits.h:71
arg1T arg1_type
Definition: function_traits_bits.h:26
arg1T arg1_type
Definition: function_traits_bits.h:248
objT obj_type
Definition: function_traits_bits.h:324
arg3T arg3_type
Definition: function_traits_bits.h:47
arg3T arg3_type
Definition: function_traits_bits.h:99