TypeTraits.h

00001 
00002 // The Loki Library
00003 // Copyright (c) 2001 by Andrei Alexandrescu
00004 // This code accompanies the book:
00005 // Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
00006 //     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
00007 // Permission to use, copy, modify, distribute and sell this software for any 
00008 //     purpose is hereby granted without fee, provided that the above copyright 
00009 //     notice appear in all copies and that both that copyright notice and this 
00010 //     permission notice appear in supporting documentation.
00011 // The author or Addison-Wesley Longman make no representations about the 
00012 //     suitability of this software for any purpose. It is provided "as is" 
00013 //     without express or implied warranty.
00015 #ifndef LOKI_TYPETRAITS_INC_
00016 #define LOKI_TYPETRAITS_INC_
00017 
00018 // $Id: TypeTraits.h 749 2006-10-17 19:49:26Z syntheticpp $
00019 
00020 
00021 #include "Typelist.h"
00022 #include "Sequence.h"
00023 
00024 #if (defined _MSC_VER) && (_MSC_VER < 1400)
00025 #include <string>
00026 #endif
00027 
00028 
00029 #ifdef _MSC_VER
00030 #pragma warning( push ) 
00031 #pragma warning( disable : 4180 ) //qualifier applied to function type has no meaning; ignored
00032 #endif
00033 
00034 namespace Loki
00035 {
00037 // class template IsCustomUnsignedInt
00038 // Offers a means to integrate nonstandard built-in unsigned integral types
00039 // (such as unsigned __int64 or unsigned long long int) with the TypeTraits 
00040 //     class template defined below.
00041 // Invocation: IsCustomUnsignedInt<T> where T is any type
00042 // Defines 'value', an enum that is 1 iff T is a custom built-in unsigned
00043 //     integral type
00044 // Specialize this class template for nonstandard unsigned integral types
00045 //     and define value = 1 in those specializations
00047 
00048     template <typename T>
00049     struct IsCustomUnsignedInt
00050     {
00051         enum { value = 0 };
00052     };        
00053 
00055 // class template IsCustomSignedInt
00056 // Offers a means to integrate nonstandard built-in unsigned integral types
00057 // (such as unsigned __int64 or unsigned long long int) with the TypeTraits 
00058 //     class template defined below.
00059 // Invocation: IsCustomSignedInt<T> where T is any type
00060 // Defines 'value', an enum that is 1 iff T is a custom built-in signed
00061 //     integral type
00062 // Specialize this class template for nonstandard unsigned integral types
00063 //     and define value = 1 in those specializations
00065 
00066     template <typename T>
00067     struct IsCustomSignedInt
00068     {
00069         enum { value = 0 };
00070     };        
00071 
00073 // class template IsCustomFloat
00074 // Offers a means to integrate nonstandard floating point types with the
00075 //     TypeTraits class template defined below.
00076 // Invocation: IsCustomFloat<T> where T is any type
00077 // Defines 'value', an enum that is 1 iff T is a custom built-in
00078 //     floating point type
00079 // Specialize this class template for nonstandard unsigned integral types
00080 //     and define value = 1 in those specializations
00082 
00083     template <typename T>
00084     struct IsCustomFloat
00085     {
00086         enum { value = 0 };
00087     };        
00088 
00090 // Helper types for class template TypeTraits defined below
00092 
00093     namespace Private
00094     {
00095 #ifndef LOKI_DISABLE_TYPELIST_MACROS    
00096         typedef LOKI_TYPELIST_4(unsigned char, unsigned short int,unsigned int, unsigned long int) 
00097             StdUnsignedInts;
00098         typedef LOKI_TYPELIST_4(signed char, short int,int, long int) 
00099             StdSignedInts;
00100         typedef LOKI_TYPELIST_3(bool, char, wchar_t) 
00101             StdOtherInts;
00102         typedef LOKI_TYPELIST_3(float, double, long double) 
00103             StdFloats;
00104 #else
00105         typedef Loki::Seq<unsigned char, unsigned short int,unsigned int, unsigned long int>::Type
00106             StdUnsignedInts;
00107         typedef Loki::Seq<signed char, short int,int, long int>::Type
00108             StdSignedInts;
00109         typedef Loki::Seq<bool, char, wchar_t>::Type
00110             StdOtherInts;
00111         typedef Loki::Seq<float, double, long double>::Type
00112             StdFloats;
00113 
00114 #endif            
00115         template <typename U> struct AddPointer
00116         {
00117             typedef U* Result;
00118         };
00119 
00120         template <typename U> struct AddPointer<U&>
00121         {
00122             typedef U* Result;
00123         };
00124 
00125         template <class U> struct AddReference
00126         {
00127             typedef U & Result;
00128         };
00129 
00130         template <class U> struct AddReference<U &>
00131         {
00132             typedef U & Result;
00133         };
00134 
00135         template <> struct AddReference<void>
00136         {
00137             typedef NullType Result;
00138         };
00139 
00140         template <class U> struct AddParameterType
00141         {
00142             typedef const U & Result;
00143         };
00144 
00145         template <class U> struct AddParameterType<U &>
00146         {
00147             typedef U & Result;
00148         };
00149 
00150         template <> struct AddParameterType<void>
00151         {
00152             typedef NullType Result;
00153         };
00154     
00155         template <typename T>
00156         struct IsFunctionPointerRaw
00157         {enum{result = 0};};
00158 
00159         template <typename T>
00160         struct IsFunctionPointerRaw<T(*)()> 
00161         {enum {result = 1};};
00162 
00163         template <typename T, 
00164             typename P01>
00165         struct IsFunctionPointerRaw<T(*)(P01)> 
00166         {enum {result = 1};};
00167 
00168         template <typename T, 
00169             typename P01, typename P02>
00170         struct IsFunctionPointerRaw<T(*)(
00171             P01, P02)> 
00172         {enum {result = 1};};
00173 
00174         template <typename T, 
00175             typename P01, typename P02, typename P03>
00176         struct IsFunctionPointerRaw<T(*)(
00177             P01, P02, P03)> 
00178         {enum {result = 1};};
00179 
00180         template <typename T, 
00181             typename P01, typename P02, typename P03, typename P04>
00182         struct IsFunctionPointerRaw<T(*)(
00183             P01, P02, P03, P04)> 
00184         {enum {result = 1};};
00185 
00186         template <typename T, 
00187             typename P01, typename P02, typename P03, typename P04, typename P05>
00188         struct IsFunctionPointerRaw<T(*)(
00189             P01, P02, P03, P04, P05)> 
00190         {enum {result = 1};};
00191 
00192         template <typename T, 
00193             typename P01, typename P02, typename P03, typename P04, typename P05,
00194             typename P06>
00195         struct IsFunctionPointerRaw<T(*)(
00196             P01, P02, P03, P04, P05, 
00197             P06)> 
00198         {enum {result = 1};};
00199 
00200         template <typename T, 
00201             typename P01, typename P02, typename P03, typename P04, typename P05,
00202             typename P06, typename P07>
00203         struct IsFunctionPointerRaw<T(*)(
00204             P01, P02, P03, P04, P05,
00205             P06, P07)> 
00206         {enum {result = 1};};
00207 
00208         template <typename T, 
00209             typename P01, typename P02, typename P03, typename P04, typename P05,
00210             typename P06, typename P07, typename P08>
00211         struct IsFunctionPointerRaw<T(*)(
00212             P01, P02, P03, P04, P05,
00213             P06, P07, P08)> 
00214         {enum {result = 1};};
00215 
00216         template <typename T, 
00217             typename P01, typename P02, typename P03, typename P04, typename P05,
00218             typename P06, typename P07, typename P08, typename P09>
00219         struct IsFunctionPointerRaw<T(*)(
00220             P01, P02, P03, P04, P05,
00221             P06, P07, P08, P09)> 
00222         {enum {result = 1};};
00223 
00224         template <typename T, 
00225             typename P01, typename P02, typename P03, typename P04, typename P05,
00226             typename P06, typename P07, typename P08, typename P09, typename P10>
00227         struct IsFunctionPointerRaw<T(*)(
00228             P01, P02, P03, P04, P05,
00229             P06, P07, P08, P09, P10)> 
00230         {enum {result = 1};};
00231 
00232         template <typename T, 
00233             typename P01, typename P02, typename P03, typename P04, typename P05,
00234             typename P06, typename P07, typename P08, typename P09, typename P10,
00235             typename P11>
00236         struct IsFunctionPointerRaw<T(*)(
00237             P01, P02, P03, P04, P05,
00238             P06, P07, P08, P09, P10,
00239             P11)> 
00240         {enum {result = 1};};
00241 
00242         template <typename T, 
00243             typename P01, typename P02, typename P03, typename P04, typename P05,
00244             typename P06, typename P07, typename P08, typename P09, typename P10,
00245             typename P11, typename P12>
00246         struct IsFunctionPointerRaw<T(*)(
00247             P01, P02, P03, P04, P05,
00248             P06, P07, P08, P09, P10,
00249             P11, P12)> 
00250         {enum {result = 1};};
00251 
00252         template <typename T, 
00253             typename P01, typename P02, typename P03, typename P04, typename P05,
00254             typename P06, typename P07, typename P08, typename P09, typename P10,
00255             typename P11, typename P12, typename P13>
00256         struct IsFunctionPointerRaw<T(*)(
00257             P01, P02, P03, P04, P05,
00258             P06, P07, P08, P09, P10,
00259             P11, P12, P13)> 
00260         {enum {result = 1};};
00261 
00262         template <typename T, 
00263             typename P01, typename P02, typename P03, typename P04, typename P05,
00264             typename P06, typename P07, typename P08, typename P09, typename P10,
00265             typename P11, typename P12, typename P13, typename P14>
00266         struct IsFunctionPointerRaw<T(*)(
00267             P01, P02, P03, P04, P05,
00268             P06, P07, P08, P09, P10,
00269             P11, P12, P13, P14)> 
00270         {enum {result = 1};};
00271 
00272         template <typename T, 
00273             typename P01, typename P02, typename P03, typename P04, typename P05,
00274             typename P06, typename P07, typename P08, typename P09, typename P10,
00275             typename P11, typename P12, typename P13, typename P14, typename P15>
00276         struct IsFunctionPointerRaw<T(*)(
00277             P01, P02, P03, P04, P05,
00278             P06, P07, P08, P09, P10,
00279             P11, P12, P13, P14, P15)> 
00280         {enum {result = 1};};
00281 
00282         template <typename T, 
00283             typename P01, typename P02, typename P03, typename P04, typename P05,
00284             typename P06, typename P07, typename P08, typename P09, typename P10,
00285             typename P11, typename P12, typename P13, typename P14, typename P15,
00286             typename P16>
00287         struct IsFunctionPointerRaw<T(*)(
00288             P01, P02, P03, P04, P05, 
00289             P06, P07, P08, P09, P10, 
00290             P11, P12, P13, P14, P15,
00291             P16)> 
00292         {enum {result = 1};};
00293 
00294         template <typename T, 
00295             typename P01, typename P02, typename P03, typename P04, typename P05,
00296             typename P06, typename P07, typename P08, typename P09, typename P10,
00297             typename P11, typename P12, typename P13, typename P14, typename P15,
00298             typename P16, typename P17>
00299         struct IsFunctionPointerRaw<T(*)(
00300             P01, P02, P03, P04, P05, 
00301             P06, P07, P08, P09, P10, 
00302             P11, P12, P13, P14, P15,
00303             P16, P17)> 
00304         {enum {result = 1};};
00305 
00306         template <typename T, 
00307             typename P01, typename P02, typename P03, typename P04, typename P05,
00308             typename P06, typename P07, typename P08, typename P09, typename P10,
00309             typename P11, typename P12, typename P13, typename P14, typename P15,
00310             typename P16, typename P17, typename P18>
00311         struct IsFunctionPointerRaw<T(*)(
00312             P01, P02, P03, P04, P05, 
00313             P06, P07, P08, P09, P10, 
00314             P11, P12, P13, P14, P15,
00315             P16, P17, P18)> 
00316         {enum {result = 1};};
00317 
00318         template <typename T, 
00319             typename P01, typename P02, typename P03, typename P04, typename P05,
00320             typename P06, typename P07, typename P08, typename P09, typename P10,
00321             typename P11, typename P12, typename P13, typename P14, typename P15,
00322             typename P16, typename P17, typename P18, typename P19>
00323         struct IsFunctionPointerRaw<T(*)(
00324             P01, P02, P03, P04, P05, 
00325             P06, P07, P08, P09, P10, 
00326             P11, P12, P13, P14, P15,
00327             P16, P17, P18, P19)> 
00328         {enum {result = 1};};
00329 
00330         template <typename T, 
00331             typename P01, typename P02, typename P03, typename P04, typename P05,
00332             typename P06, typename P07, typename P08, typename P09, typename P10,
00333             typename P11, typename P12, typename P13, typename P14, typename P15,
00334             typename P16, typename P17, typename P18, typename P19, typename P20>
00335         struct IsFunctionPointerRaw<T(*)(
00336             P01, P02, P03, P04, P05, 
00337             P06, P07, P08, P09, P10, 
00338             P11, P12, P13, P14, P15,
00339             P16, P17, P18, P19, P20)> 
00340         {enum {result = 1};};
00341 
00342         template <typename T>
00343         struct IsFunctionPointerRaw<T(*)(
00344             ...)> 
00345         {enum {result = 1};};
00346 
00347         template <typename T, 
00348             typename P01>
00349         struct IsFunctionPointerRaw<T(*)(
00350             P01, ...)> 
00351         {enum {result = 1};};
00352 
00353         template <typename T, 
00354             typename P01, typename P02>
00355         struct IsFunctionPointerRaw<T(*)(
00356             P01, P02, ...)> 
00357         {enum {result = 1};};
00358 
00359         template <typename T, 
00360             typename P01, typename P02, typename P03>
00361         struct IsFunctionPointerRaw<T(*)(
00362             P01, P02, P03, ...)> 
00363         {enum {result = 1};};
00364 
00365         template <typename T, 
00366             typename P01, typename P02, typename P03, typename P04>
00367         struct IsFunctionPointerRaw<T(*)(
00368             P01, P02, P03, P04, ...)> 
00369         {enum {result = 1};};
00370 
00371         template <typename T, 
00372             typename P01, typename P02, typename P03, typename P04, typename P05>
00373         struct IsFunctionPointerRaw<T(*)(
00374             P01, P02, P03, P04, P05,
00375             ...)> 
00376         {enum {result = 1};};
00377 
00378         template <typename T, 
00379             typename P01, typename P02, typename P03, typename P04, typename P05,
00380             typename P06>
00381         struct IsFunctionPointerRaw<T(*)(
00382             P01, P02, P03, P04, P05, 
00383             P06, ...)> 
00384         {enum {result = 1};};
00385 
00386         template <typename T, 
00387             typename P01, typename P02, typename P03, typename P04, typename P05,
00388             typename P06, typename P07>
00389         struct IsFunctionPointerRaw<T(*)(
00390             P01, P02, P03, P04, P05,
00391             P06, P07, ...)> 
00392         {enum {result = 1};};
00393 
00394         template <typename T, 
00395             typename P01, typename P02, typename P03, typename P04, typename P05,
00396             typename P06, typename P07, typename P08>
00397         struct IsFunctionPointerRaw<T(*)(
00398             P01, P02, P03, P04, P05,
00399             P06, P07, P08, ...)> 
00400         {enum {result = 1};};
00401 
00402         template <typename T, 
00403             typename P01, typename P02, typename P03, typename P04, typename P05,
00404             typename P06, typename P07, typename P08, typename P09>
00405         struct IsFunctionPointerRaw<T(*)(
00406             P01, P02, P03, P04, P05,
00407             P06, P07, P08, P09, ...)> 
00408         {enum {result = 1};};
00409 
00410         template <typename T, 
00411             typename P01, typename P02, typename P03, typename P04, typename P05,
00412             typename P06, typename P07, typename P08, typename P09, typename P10>
00413         struct IsFunctionPointerRaw<T(*)(
00414             P01, P02, P03, P04, P05,
00415             P06, P07, P08, P09, P10,
00416             ...)> 
00417         {enum {result = 1};};
00418 
00419         template <typename T, 
00420             typename P01, typename P02, typename P03, typename P04, typename P05,
00421             typename P06, typename P07, typename P08, typename P09, typename P10,
00422             typename P11>
00423         struct IsFunctionPointerRaw<T(*)(
00424             P01, P02, P03, P04, P05,
00425             P06, P07, P08, P09, P10,
00426             P11, ...)> 
00427         {enum {result = 1};};
00428 
00429         template <typename T, 
00430             typename P01, typename P02, typename P03, typename P04, typename P05,
00431             typename P06, typename P07, typename P08, typename P09, typename P10,
00432             typename P11, typename P12>
00433         struct IsFunctionPointerRaw<T(*)(
00434             P01, P02, P03, P04, P05,
00435             P06, P07, P08, P09, P10,
00436             P11, P12, ...)> 
00437         {enum {result = 1};};
00438 
00439         template <typename T, 
00440             typename P01, typename P02, typename P03, typename P04, typename P05,
00441             typename P06, typename P07, typename P08, typename P09, typename P10,
00442             typename P11, typename P12, typename P13>
00443         struct IsFunctionPointerRaw<T(*)(
00444             P01, P02, P03, P04, P05,
00445             P06, P07, P08, P09, P10,
00446             P11, P12, P13, ...)> 
00447         {enum {result = 1};};
00448 
00449         template <typename T, 
00450             typename P01, typename P02, typename P03, typename P04, typename P05,
00451             typename P06, typename P07, typename P08, typename P09, typename P10,
00452             typename P11, typename P12, typename P13, typename P14>
00453         struct IsFunctionPointerRaw<T(*)(
00454             P01, P02, P03, P04, P05,
00455             P06, P07, P08, P09, P10,
00456             P11, P12, P13, P14, ...)> 
00457         {enum {result = 1};};
00458 
00459         template <typename T, 
00460             typename P01, typename P02, typename P03, typename P04, typename P05,
00461             typename P06, typename P07, typename P08, typename P09, typename P10,
00462             typename P11, typename P12, typename P13, typename P14, typename P15>
00463         struct IsFunctionPointerRaw<T(*)(
00464             P01, P02, P03, P04, P05,
00465             P06, P07, P08, P09, P10,
00466             P11, P12, P13, P14, P15,
00467             ...)> 
00468         {enum {result = 1};};
00469 
00470         template <typename T, 
00471             typename P01, typename P02, typename P03, typename P04, typename P05,
00472             typename P06, typename P07, typename P08, typename P09, typename P10,
00473             typename P11, typename P12, typename P13, typename P14, typename P15,
00474             typename P16>
00475         struct IsFunctionPointerRaw<T(*)(
00476             P01, P02, P03, P04, P05, 
00477             P06, P07, P08, P09, P10, 
00478             P11, P12, P13, P14, P15,
00479             P16, ...)> 
00480         {enum {result = 1};};
00481 
00482         template <typename T, 
00483             typename P01, typename P02, typename P03, typename P04, typename P05,
00484             typename P06, typename P07, typename P08, typename P09, typename P10,
00485             typename P11, typename P12, typename P13, typename P14, typename P15,
00486             typename P16, typename P17>
00487         struct IsFunctionPointerRaw<T(*)(
00488             P01, P02, P03, P04, P05, 
00489             P06, P07, P08, P09, P10, 
00490             P11, P12, P13, P14, P15,
00491             P16, P17, ...)> 
00492         {enum {result = 1};};
00493 
00494         template <typename T, 
00495             typename P01, typename P02, typename P03, typename P04, typename P05,
00496             typename P06, typename P07, typename P08, typename P09, typename P10,
00497             typename P11, typename P12, typename P13, typename P14, typename P15,
00498             typename P16, typename P17, typename P18>
00499         struct IsFunctionPointerRaw<T(*)(
00500             P01, P02, P03, P04, P05, 
00501             P06, P07, P08, P09, P10, 
00502             P11, P12, P13, P14, P15,
00503             P16, P17, P18, ...)> 
00504         {enum {result = 1};};
00505 
00506         template <typename T, 
00507             typename P01, typename P02, typename P03, typename P04, typename P05,
00508             typename P06, typename P07, typename P08, typename P09, typename P10,
00509             typename P11, typename P12, typename P13, typename P14, typename P15,
00510             typename P16, typename P17, typename P18, typename P19>
00511         struct IsFunctionPointerRaw<T(*)(
00512             P01, P02, P03, P04, P05, 
00513             P06, P07, P08, P09, P10, 
00514             P11, P12, P13, P14, P15,
00515             P16, P17, P18, P19, ...)> 
00516         {enum {result = 1};};
00517 
00518         template <typename T, 
00519             typename P01, typename P02, typename P03, typename P04, typename P05,
00520             typename P06, typename P07, typename P08, typename P09, typename P10,
00521             typename P11, typename P12, typename P13, typename P14, typename P15,
00522             typename P16, typename P17, typename P18, typename P19, typename P20>
00523         struct IsFunctionPointerRaw<T(*)(
00524             P01, P02, P03, P04, P05, 
00525             P06, P07, P08, P09, P10, 
00526             P11, P12, P13, P14, P15,
00527             P16, P17, P18, P19, P20,
00528             ...)> 
00529         {enum {result = 1};};
00530         
00531         
00532         template <typename T>
00533         struct IsMemberFunctionPointerRaw
00534         {enum{result = 0};};
00535 
00536         template <typename T, typename S>
00537         struct IsMemberFunctionPointerRaw<T (S::*)()> 
00538         {enum {result = 1};};
00539 
00540         template <typename T, typename S, 
00541             typename P01>
00542         struct IsMemberFunctionPointerRaw<T (S::*)(P01)> 
00543         {enum {result = 1};};
00544 
00545         template <typename T, typename S, 
00546             typename P01, typename P02>
00547         struct IsMemberFunctionPointerRaw<T (S::*)(
00548             P01, P02)> 
00549         {enum {result = 1};};
00550 
00551         template <typename T, typename S, 
00552             typename P01, typename P02, typename P03>
00553         struct IsMemberFunctionPointerRaw<T (S::*)(
00554             P01, P02, P03)> 
00555         {enum {result = 1};};
00556 
00557         template <typename T, typename S, 
00558             typename P01, typename P02, typename P03, typename P04>
00559         struct IsMemberFunctionPointerRaw<T (S::*)(
00560             P01, P02, P03, P04)> 
00561         {enum {result = 1};};
00562 
00563         template <typename T, typename S, 
00564             typename P01, typename P02, typename P03, typename P04, typename P05>
00565         struct IsMemberFunctionPointerRaw<T (S::*)(
00566             P01, P02, P03, P04, P05)> 
00567         {enum {result = 1};};
00568 
00569         template <typename T, typename S, 
00570             typename P01, typename P02, typename P03, typename P04, typename P05,
00571             typename P06>
00572         struct IsMemberFunctionPointerRaw<T (S::*)(
00573             P01, P02, P03, P04, P05, 
00574             P06)> 
00575         {enum {result = 1};};
00576 
00577         template <typename T, typename S, 
00578             typename P01, typename P02, typename P03, typename P04, typename P05,
00579             typename P06, typename P07>
00580         struct IsMemberFunctionPointerRaw<T (S::*)(
00581             P01, P02, P03, P04, P05,
00582             P06, P07)> 
00583         {enum {result = 1};};
00584 
00585         template <typename T, typename S, 
00586             typename P01, typename P02, typename P03, typename P04, typename P05,
00587             typename P06, typename P07, typename P08>
00588         struct IsMemberFunctionPointerRaw<T (S::*)(
00589             P01, P02, P03, P04, P05,
00590             P06, P07, P08)> 
00591         {enum {result = 1};};
00592 
00593         template <typename T, typename S, 
00594             typename P01, typename P02, typename P03, typename P04, typename P05,
00595             typename P06, typename P07, typename P08, typename P09>
00596         struct IsMemberFunctionPointerRaw<T (S::*)(
00597             P01, P02, P03, P04, P05,
00598             P06, P07, P08, P09)> 
00599         {enum {result = 1};};
00600 
00601         template <typename T, typename S, 
00602             typename P01, typename P02, typename P03, typename P04, typename P05,
00603             typename P06, typename P07, typename P08, typename P09, typename P10>
00604         struct IsMemberFunctionPointerRaw<T (S::*)(
00605             P01, P02, P03, P04, P05,
00606             P06, P07, P08, P09, P10)> 
00607         {enum {result = 1};};
00608 
00609         template <typename T, typename S, 
00610             typename P01, typename P02, typename P03, typename P04, typename P05,
00611             typename P06, typename P07, typename P08, typename P09, typename P10,
00612             typename P11>
00613         struct IsMemberFunctionPointerRaw<T (S::*)(
00614             P01, P02, P03, P04, P05,
00615             P06, P07, P08, P09, P10,
00616             P11)> 
00617         {enum {result = 1};};
00618 
00619         template <typename T, typename S, 
00620             typename P01, typename P02, typename P03, typename P04, typename P05,
00621             typename P06, typename P07, typename P08, typename P09, typename P10,
00622             typename P11, typename P12>
00623         struct IsMemberFunctionPointerRaw<T (S::*)(
00624             P01, P02, P03, P04, P05,
00625             P06, P07, P08, P09, P10,
00626             P11, P12)> 
00627         {enum {result = 1};};
00628 
00629         template <typename T, typename S, 
00630             typename P01, typename P02, typename P03, typename P04, typename P05,
00631             typename P06, typename P07, typename P08, typename P09, typename P10,
00632             typename P11, typename P12, typename P13>
00633         struct IsMemberFunctionPointerRaw<T (S::*)(
00634             P01, P02, P03, P04, P05,
00635             P06, P07, P08, P09, P10,
00636             P11, P12, P13)> 
00637         {enum {result = 1};};
00638 
00639         template <typename T, typename S, 
00640             typename P01, typename P02, typename P03, typename P04, typename P05,
00641             typename P06, typename P07, typename P08, typename P09, typename P10,
00642             typename P11, typename P12, typename P13, typename P14>
00643         struct IsMemberFunctionPointerRaw<T (S::*)(
00644             P01, P02, P03, P04, P05,
00645             P06, P07, P08, P09, P10,
00646             P11, P12, P13, P14)> 
00647         {enum {result = 1};};
00648 
00649         template <typename T, typename S, 
00650             typename P01, typename P02, typename P03, typename P04, typename P05,
00651             typename P06, typename P07, typename P08, typename P09, typename P10,
00652             typename P11, typename P12, typename P13, typename P14, typename P15>
00653         struct IsMemberFunctionPointerRaw<T (S::*)(
00654             P01, P02, P03, P04, P05,
00655             P06, P07, P08, P09, P10,
00656             P11, P12, P13, P14, P15)> 
00657         {enum {result = 1};};
00658 
00659         template <typename T, typename S, 
00660             typename P01, typename P02, typename P03, typename P04, typename P05,
00661             typename P06, typename P07, typename P08, typename P09, typename P10,
00662             typename P11, typename P12, typename P13, typename P14, typename P15,
00663             typename P16>
00664         struct IsMemberFunctionPointerRaw<T (S::*)(
00665             P01, P02, P03, P04, P05, 
00666             P06, P07, P08, P09, P10, 
00667             P11, P12, P13, P14, P15,
00668             P16)> 
00669         {enum {result = 1};};
00670 
00671         template <typename T, typename S, 
00672             typename P01, typename P02, typename P03, typename P04, typename P05,
00673             typename P06, typename P07, typename P08, typename P09, typename P10,
00674             typename P11, typename P12, typename P13, typename P14, typename P15,
00675             typename P16, typename P17>
00676         struct IsMemberFunctionPointerRaw<T (S::*)(
00677             P01, P02, P03, P04, P05, 
00678             P06, P07, P08, P09, P10, 
00679             P11, P12, P13, P14, P15,
00680             P16, P17)> 
00681         {enum {result = 1};};
00682 
00683         template <typename T, typename S, 
00684             typename P01, typename P02, typename P03, typename P04, typename P05,
00685             typename P06, typename P07, typename P08, typename P09, typename P10,
00686             typename P11, typename P12, typename P13, typename P14, typename P15,
00687             typename P16, typename P17, typename P18>
00688         struct IsMemberFunctionPointerRaw<T (S::*)(
00689             P01, P02, P03, P04, P05, 
00690             P06, P07, P08, P09, P10, 
00691             P11, P12, P13, P14, P15,
00692             P16, P17, P18)> 
00693         {enum {result = 1};};
00694 
00695         template <typename T, typename S, 
00696             typename P01, typename P02, typename P03, typename P04, typename P05,
00697             typename P06, typename P07, typename P08, typename P09, typename P10,
00698             typename P11, typename P12, typename P13, typename P14, typename P15,
00699             typename P16, typename P17, typename P18, typename P19>
00700         struct IsMemberFunctionPointerRaw<T (S::*)(
00701             P01, P02, P03, P04, P05, 
00702             P06, P07, P08, P09, P10, 
00703             P11, P12, P13, P14, P15,
00704             P16, P17, P18, P19)> 
00705         {enum {result = 1};};
00706 
00707         template <typename T, typename S, 
00708             typename P01, typename P02, typename P03, typename P04, typename P05,
00709             typename P06, typename P07, typename P08, typename P09, typename P10,
00710             typename P11, typename P12, typename P13, typename P14, typename P15,
00711             typename P16, typename P17, typename P18, typename P19, typename P20>
00712         struct IsMemberFunctionPointerRaw<T (S::*)(
00713             P01, P02, P03, P04, P05, 
00714             P06, P07, P08, P09, P10, 
00715             P11, P12, P13, P14, P15,
00716             P16, P17, P18, P19, P20)> 
00717         {enum {result = 1};};
00718 
00719         template <typename T, typename S>
00720         struct IsMemberFunctionPointerRaw<T (S::*)(
00721             ...)> 
00722         {enum {result = 1};};
00723 
00724         template <typename T, typename S, 
00725             typename P01>
00726         struct IsMemberFunctionPointerRaw<T (S::*)(
00727             P01, ...)> 
00728         {enum {result = 1};};
00729 
00730         template <typename T, typename S, 
00731             typename P01, typename P02>
00732         struct IsMemberFunctionPointerRaw<T (S::*)(
00733             P01, P02, ...)> 
00734         {enum {result = 1};};
00735 
00736         template <typename T, typename S, 
00737             typename P01, typename P02, typename P03>
00738         struct IsMemberFunctionPointerRaw<T (S::*)(
00739             P01, P02, P03, ...)> 
00740         {enum {result = 1};};
00741 
00742         template <typename T, typename S, 
00743             typename P01, typename P02, typename P03, typename P04>
00744         struct IsMemberFunctionPointerRaw<T (S::*)(
00745             P01, P02, P03, P04, ...)> 
00746         {enum {result = 1};};
00747 
00748         template <typename T, typename S, 
00749             typename P01, typename P02, typename P03, typename P04, typename P05>
00750         struct IsMemberFunctionPointerRaw<T (S::*)(
00751             P01, P02, P03, P04, P05,
00752             ...)> 
00753         {enum {result = 1};};
00754 
00755         template <typename T, typename S, 
00756             typename P01, typename P02, typename P03, typename P04, typename P05,
00757             typename P06>
00758         struct IsMemberFunctionPointerRaw<T (S::*)(
00759             P01, P02, P03, P04, P05, 
00760             P06, ...)> 
00761         {enum {result = 1};};
00762 
00763         template <typename T, typename S, 
00764             typename P01, typename P02, typename P03, typename P04, typename P05,
00765             typename P06, typename P07>
00766         struct IsMemberFunctionPointerRaw<T (S::*)(
00767             P01, P02, P03, P04, P05,
00768             P06, P07, ...)> 
00769         {enum {result = 1};};
00770 
00771         template <typename T, typename S, 
00772             typename P01, typename P02, typename P03, typename P04, typename P05,
00773             typename P06, typename P07, typename P08>
00774         struct IsMemberFunctionPointerRaw<T (S::*)(
00775             P01, P02, P03, P04, P05,
00776             P06, P07, P08, ...)> 
00777         {enum {result = 1};};
00778 
00779         template <typename T, typename S, 
00780             typename P01, typename P02, typename P03, typename P04, typename P05,
00781             typename P06, typename P07, typename P08, typename P09>
00782         struct IsMemberFunctionPointerRaw<T (S::*)(
00783             P01, P02, P03, P04, P05,
00784             P06, P07, P08, P09, ...)> 
00785         {enum {result = 1};};
00786 
00787         template <typename T, typename S, 
00788             typename P01, typename P02, typename P03, typename P04, typename P05,
00789             typename P06, typename P07, typename P08, typename P09, typename P10>
00790         struct IsMemberFunctionPointerRaw<T (S::*)(
00791             P01, P02, P03, P04, P05,
00792             P06, P07, P08, P09, P10,
00793             ...)> 
00794         {enum {result = 1};};
00795 
00796         template <typename T, typename S, 
00797             typename P01, typename P02, typename P03, typename P04, typename P05,
00798             typename P06, typename P07, typename P08, typename P09, typename P10,
00799             typename P11>
00800         struct IsMemberFunctionPointerRaw<T (S::*)(
00801             P01, P02, P03, P04, P05,
00802             P06, P07, P08, P09, P10,
00803             P11, ...)> 
00804         {enum {result = 1};};
00805 
00806         template <typename T, typename S, 
00807             typename P01, typename P02, typename P03, typename P04, typename P05,
00808             typename P06, typename P07, typename P08, typename P09, typename P10,
00809             typename P11, typename P12>
00810         struct IsMemberFunctionPointerRaw<T (S::*)(
00811             P01, P02, P03, P04, P05,
00812             P06, P07, P08, P09, P10,
00813             P11, P12, ...)> 
00814         {enum {result = 1};};
00815 
00816         template <typename T, typename S, 
00817             typename P01, typename P02, typename P03, typename P04, typename P05,
00818             typename P06, typename P07, typename P08, typename P09, typename P10,
00819             typename P11, typename P12, typename P13>
00820         struct IsMemberFunctionPointerRaw<T (S::*)(
00821             P01, P02, P03, P04, P05,
00822             P06, P07, P08, P09, P10,
00823             P11, P12, P13, ...)> 
00824         {enum {result = 1};};
00825 
00826         template <typename T, typename S, 
00827             typename P01, typename P02, typename P03, typename P04, typename P05,
00828             typename P06, typename P07, typename P08, typename P09, typename P10,
00829             typename P11, typename P12, typename P13, typename P14>
00830         struct IsMemberFunctionPointerRaw<T (S::*)(
00831             P01, P02, P03, P04, P05,
00832             P06, P07, P08, P09, P10,
00833             P11, P12, P13, P14, ...)> 
00834         {enum {result = 1};};
00835 
00836         template <typename T, typename S, 
00837             typename P01, typename P02, typename P03, typename P04, typename P05,
00838             typename P06, typename P07, typename P08, typename P09, typename P10,
00839             typename P11, typename P12, typename P13, typename P14, typename P15>
00840         struct IsMemberFunctionPointerRaw<T (S::*)(
00841             P01, P02, P03, P04, P05,
00842             P06, P07, P08, P09, P10,
00843             P11, P12, P13, P14, P15,
00844             ...)> 
00845         {enum {result = 1};};
00846 
00847         template <typename T, typename S, 
00848             typename P01, typename P02, typename P03, typename P04, typename P05,
00849             typename P06, typename P07, typename P08, typename P09, typename P10,
00850             typename P11, typename P12, typename P13, typename P14, typename P15,
00851             typename P16>
00852         struct IsMemberFunctionPointerRaw<T (S::*)(
00853             P01, P02, P03, P04, P05, 
00854             P06, P07, P08, P09, P10, 
00855             P11, P12, P13, P14, P15,
00856             P16, ...)> 
00857         {enum {result = 1};};
00858 
00859         template <typename T, typename S, 
00860             typename P01, typename P02, typename P03, typename P04, typename P05,
00861             typename P06, typename P07, typename P08, typename P09, typename P10,
00862             typename P11, typename P12, typename P13, typename P14, typename P15,
00863             typename P16, typename P17>
00864         struct IsMemberFunctionPointerRaw<T (S::*)(
00865             P01, P02, P03, P04, P05, 
00866             P06, P07, P08, P09, P10, 
00867             P11, P12, P13, P14, P15,
00868             P16, P17, ...)> 
00869         {enum {result = 1};};
00870 
00871         template <typename T, typename S, 
00872             typename P01, typename P02, typename P03, typename P04, typename P05,
00873             typename P06, typename P07, typename P08, typename P09, typename P10,
00874             typename P11, typename P12, typename P13, typename P14, typename P15,
00875             typename P16, typename P17, typename P18>
00876         struct IsMemberFunctionPointerRaw<T (S::*)(
00877             P01, P02, P03, P04, P05, 
00878             P06, P07, P08, P09, P10, 
00879             P11, P12, P13, P14, P15,
00880             P16, P17, P18, ...)> 
00881         {enum {result = 1};};
00882 
00883         template <typename T, typename S, 
00884             typename P01, typename P02, typename P03, typename P04, typename P05,
00885             typename P06, typename P07, typename P08, typename P09, typename P10,
00886             typename P11, typename P12, typename P13, typename P14, typename P15,
00887             typename P16, typename P17, typename P18, typename P19>
00888         struct IsMemberFunctionPointerRaw<T (S::*)(
00889             P01, P02, P03, P04, P05, 
00890             P06, P07, P08, P09, P10, 
00891             P11, P12, P13, P14, P15,
00892             P16, P17, P18, P19, ...)> 
00893         {enum {result = 1};};
00894 
00895         template <typename T, typename S, 
00896             typename P01, typename P02, typename P03, typename P04, typename P05,
00897             typename P06, typename P07, typename P08, typename P09, typename P10,
00898             typename P11, typename P12, typename P13, typename P14, typename P15,
00899             typename P16, typename P17, typename P18, typename P19, typename P20>
00900         struct IsMemberFunctionPointerRaw<T (S::*)(
00901             P01, P02, P03, P04, P05, 
00902             P06, P07, P08, P09, P10, 
00903             P11, P12, P13, P14, P15,
00904             P16, P17, P18, P19, P20,
00905             ...)> 
00906         {enum {result = 1};};
00907 
00908         // Const versions
00909 
00910         template <typename T, typename S>
00911         struct IsMemberFunctionPointerRaw<T (S::*)() const> 
00912         {enum {result = 1};};
00913 
00914         template <typename T, typename S, 
00915             typename P01>
00916         struct IsMemberFunctionPointerRaw<T (S::*)(P01) const> 
00917         {enum {result = 1};};
00918 
00919         template <typename T, typename S, 
00920             typename P01, typename P02>
00921         struct IsMemberFunctionPointerRaw<T (S::*)(
00922             P01, P02) const> 
00923         {enum {result = 1};};
00924 
00925         template <typename T, typename S, 
00926             typename P01, typename P02, typename P03>
00927         struct IsMemberFunctionPointerRaw<T (S::*)(
00928             P01, P02, P03) const> 
00929         {enum {result = 1};};
00930 
00931         template <typename T, typename S, 
00932             typename P01, typename P02, typename P03, typename P04>
00933         struct IsMemberFunctionPointerRaw<T (S::*)(
00934             P01, P02, P03, P04) const> 
00935         {enum {result = 1};};
00936 
00937         template <typename T, typename S, 
00938             typename P01, typename P02, typename P03, typename P04, typename P05>
00939         struct IsMemberFunctionPointerRaw<T (S::*)(
00940             P01, P02, P03, P04, P05) const> 
00941         {enum {result = 1};};
00942 
00943         template <typename T, typename S, 
00944             typename P01, typename P02, typename P03, typename P04, typename P05,
00945             typename P06>
00946         struct IsMemberFunctionPointerRaw<T (S::*)(
00947             P01, P02, P03, P04, P05, 
00948             P06) const> 
00949         {enum {result = 1};};
00950 
00951         template <typename T, typename S, 
00952             typename P01, typename P02, typename P03, typename P04, typename P05,
00953             typename P06, typename P07>
00954         struct IsMemberFunctionPointerRaw<T (S::*)(
00955             P01, P02, P03, P04, P05,
00956             P06, P07) const> 
00957         {enum {result = 1};};
00958 
00959         template <typename T, typename S, 
00960             typename P01, typename P02, typename P03, typename P04, typename P05,
00961             typename P06, typename P07, typename P08>
00962         struct IsMemberFunctionPointerRaw<T (S::*)(
00963             P01, P02, P03, P04, P05,
00964             P06, P07, P08) const> 
00965         {enum {result = 1};};
00966 
00967         template <typename T, typename S, 
00968             typename P01, typename P02, typename P03, typename P04, typename P05,
00969             typename P06, typename P07, typename P08, typename P09>
00970         struct IsMemberFunctionPointerRaw<T (S::*)(
00971             P01, P02, P03, P04, P05,
00972             P06, P07, P08, P09) const> 
00973         {enum {result = 1};};
00974 
00975         template <typename T, typename S, 
00976             typename P01, typename P02, typename P03, typename P04, typename P05,
00977             typename P06, typename P07, typename P08, typename P09, typename P10>
00978         struct IsMemberFunctionPointerRaw<T (S::*)(
00979             P01, P02, P03, P04, P05,
00980             P06, P07, P08, P09, P10) const> 
00981         {enum {result = 1};};
00982 
00983         template <typename T, typename S, 
00984             typename P01, typename P02, typename P03, typename P04, typename P05,
00985             typename P06, typename P07, typename P08, typename P09, typename P10,
00986             typename P11>
00987         struct IsMemberFunctionPointerRaw<T (S::*)(
00988             P01, P02, P03, P04, P05,
00989             P06, P07, P08, P09, P10,
00990             P11) const> 
00991         {enum {result = 1};};
00992 
00993         template <typename T, typename S, 
00994             typename P01, typename P02, typename P03, typename P04, typename P05,
00995             typename P06, typename P07, typename P08, typename P09, typename P10,
00996             typename P11, typename P12>
00997         struct IsMemberFunctionPointerRaw<T (S::*)(
00998             P01, P02, P03, P04, P05,
00999             P06, P07, P08, P09, P10,
01000             P11, P12) const> 
01001         {enum {result = 1};};
01002 
01003         template <typename T, typename S, 
01004             typename P01, typename P02, typename P03, typename P04, typename P05,
01005             typename P06, typename P07, typename P08, typename P09, typename P10,
01006             typename P11, typename P12, typename P13>
01007         struct IsMemberFunctionPointerRaw<T (S::*)(
01008             P01, P02, P03, P04, P05,
01009             P06, P07, P08, P09, P10,
01010             P11, P12, P13) const> 
01011         {enum {result = 1};};
01012 
01013         template <typename T, typename S, 
01014             typename P01, typename P02, typename P03, typename P04, typename P05,
01015             typename P06, typename P07, typename P08, typename P09, typename P10,
01016             typename P11, typename P12, typename P13, typename P14>
01017         struct IsMemberFunctionPointerRaw<T (S::*)(
01018             P01, P02, P03, P04, P05,
01019             P06, P07, P08, P09, P10,
01020             P11, P12, P13, P14) const> 
01021         {enum {result = 1};};
01022 
01023         template <typename T, typename S, 
01024             typename P01, typename P02, typename P03, typename P04, typename P05,
01025             typename P06, typename P07, typename P08, typename P09, typename P10,
01026             typename P11, typename P12, typename P13, typename P14, typename P15>
01027         struct IsMemberFunctionPointerRaw<T (S::*)(
01028             P01, P02, P03, P04, P05,
01029             P06, P07, P08, P09, P10,
01030             P11, P12, P13, P14, P15) const> 
01031         {enum {result = 1};};
01032 
01033         template <typename T, typename S, 
01034             typename P01, typename P02, typename P03, typename P04, typename P05,
01035             typename P06, typename P07, typename P08, typename P09, typename P10,
01036             typename P11, typename P12, typename P13, typename P14, typename P15,
01037             typename P16>
01038         struct IsMemberFunctionPointerRaw<T (S::*)(
01039             P01, P02, P03, P04, P05, 
01040             P06, P07, P08, P09, P10, 
01041             P11, P12, P13, P14, P15,
01042             P16) const> 
01043         {enum {result = 1};};
01044 
01045         template <typename T, typename S, 
01046             typename P01, typename P02, typename P03, typename P04, typename P05,
01047             typename P06, typename P07, typename P08, typename P09, typename P10,
01048             typename P11, typename P12, typename P13, typename P14, typename P15,
01049             typename P16, typename P17>
01050         struct IsMemberFunctionPointerRaw<T (S::*)(
01051             P01, P02, P03, P04, P05, 
01052             P06, P07, P08, P09, P10, 
01053             P11, P12, P13, P14, P15,
01054             P16, P17) const> 
01055         {enum {result = 1};};
01056 
01057         template <typename T, typename S, 
01058             typename P01, typename P02, typename P03, typename P04, typename P05,
01059             typename P06, typename P07, typename P08, typename P09, typename P10,
01060             typename P11, typename P12, typename P13, typename P14, typename P15,
01061             typename P16, typename P17, typename P18>
01062         struct IsMemberFunctionPointerRaw<T (S::*)(
01063             P01, P02, P03, P04, P05, 
01064             P06, P07, P08, P09, P10, 
01065             P11, P12, P13, P14, P15,
01066             P16, P17, P18) const> 
01067         {enum {result = 1};};
01068 
01069         template <typename T, typename S, 
01070             typename P01, typename P02, typename P03, typename P04, typename P05,
01071             typename P06, typename P07, typename P08, typename P09, typename P10,
01072             typename P11, typename P12, typename P13, typename P14, typename P15,
01073             typename P16, typename P17, typename P18, typename P19>
01074         struct IsMemberFunctionPointerRaw<T (S::*)(
01075             P01, P02, P03, P04, P05, 
01076             P06, P07, P08, P09, P10, 
01077             P11, P12, P13, P14, P15,
01078             P16, P17, P18, P19) const> 
01079         {enum {result = 1};};
01080 
01081         template <typename T, typename S, 
01082             typename P01, typename P02, typename P03, typename P04, typename P05,
01083             typename P06, typename P07, typename P08, typename P09, typename P10,
01084             typename P11, typename P12, typename P13, typename P14, typename P15,
01085             typename P16, typename P17, typename P18, typename P19, typename P20>
01086         struct IsMemberFunctionPointerRaw<T (S::*)(
01087             P01, P02, P03, P04, P05, 
01088             P06, P07, P08, P09, P10, 
01089             P11, P12, P13, P14, P15,
01090             P16, P17, P18, P19, P20) const> 
01091         {enum {result = 1};};
01092 
01093         template <typename T, typename S>
01094         struct IsMemberFunctionPointerRaw<T (S::*)(
01095             ...) const> 
01096         {enum {result = 1};};
01097 
01098         template <typename T, typename S, 
01099             typename P01>
01100         struct IsMemberFunctionPointerRaw<T (S::*)(
01101             P01, ...) const> 
01102         {enum {result = 1};};
01103 
01104         template <typename T, typename S, 
01105             typename P01, typename P02>
01106         struct IsMemberFunctionPointerRaw<T (S::*)(
01107             P01, P02, ...) const> 
01108         {enum {result = 1};};
01109 
01110         template <typename T, typename S, 
01111             typename P01, typename P02, typename P03>
01112         struct IsMemberFunctionPointerRaw<T (S::*)(
01113             P01, P02, P03, ...) const> 
01114         {enum {result = 1};};
01115 
01116         template <typename T, typename S, 
01117             typename P01, typename P02, typename P03, typename P04>
01118         struct IsMemberFunctionPointerRaw<T (S::*)(
01119             P01, P02, P03, P04, ...) const> 
01120         {enum {result = 1};};
01121 
01122         template <typename T, typename S, 
01123             typename P01, typename P02, typename P03, typename P04, typename P05>
01124         struct IsMemberFunctionPointerRaw<T (S::*)(
01125             P01, P02, P03, P04, P05,
01126             ...) const> 
01127         {enum {result = 1};};
01128 
01129         template <typename T, typename S, 
01130             typename P01, typename P02, typename P03, typename P04, typename P05,
01131             typename P06>
01132         struct IsMemberFunctionPointerRaw<T (S::*)(
01133             P01, P02, P03, P04, P05, 
01134             P06, ...) const> 
01135         {enum {result = 1};};
01136 
01137         template <typename T, typename S, 
01138             typename P01, typename P02, typename P03, typename P04, typename P05,
01139             typename P06, typename P07>
01140         struct IsMemberFunctionPointerRaw<T (S::*)(
01141             P01, P02, P03, P04, P05,
01142             P06, P07, ...) const> 
01143         {enum {result = 1};};
01144 
01145         template <typename T, typename S, 
01146             typename P01, typename P02, typename P03, typename P04, typename P05,
01147             typename P06, typename P07, typename P08>
01148         struct IsMemberFunctionPointerRaw<T (S::*)(
01149             P01, P02, P03, P04, P05,
01150             P06, P07, P08, ...) const> 
01151         {enum {result = 1};};
01152 
01153         template <typename T, typename S, 
01154             typename P01, typename P02, typename P03, typename P04, typename P05,
01155             typename P06, typename P07, typename P08, typename P09>
01156         struct IsMemberFunctionPointerRaw<T (S::*)(
01157             P01, P02, P03, P04, P05,
01158             P06, P07, P08, P09, ...) const> 
01159         {enum {result = 1};};
01160 
01161         template <typename T, typename S, 
01162             typename P01, typename P02, typename P03, typename P04, typename P05,
01163             typename P06, typename P07, typename P08, typename P09, typename P10>
01164         struct IsMemberFunctionPointerRaw<T (S::*)(
01165             P01, P02, P03, P04, P05,
01166             P06, P07, P08, P09, P10,
01167             ...) const> 
01168         {enum {result = 1};};
01169 
01170         template <typename T, typename S, 
01171             typename P01, typename P02, typename P03, typename P04, typename P05,
01172             typename P06, typename P07, typename P08, typename P09, typename P10,
01173             typename P11>
01174         struct IsMemberFunctionPointerRaw<T (S::*)(
01175             P01, P02, P03, P04, P05,
01176             P06, P07, P08, P09, P10,
01177             P11, ...) const> 
01178         {enum {result = 1};};
01179 
01180         template <typename T, typename S, 
01181             typename P01, typename P02, typename P03, typename P04, typename P05,
01182             typename P06, typename P07, typename P08, typename P09, typename P10,
01183             typename P11, typename P12>
01184         struct IsMemberFunctionPointerRaw<T (S::*)(
01185             P01, P02, P03, P04, P05,
01186             P06, P07, P08, P09, P10,
01187             P11, P12, ...) const> 
01188         {enum {result = 1};};
01189 
01190         template <typename T, typename S, 
01191             typename P01, typename P02, typename P03, typename P04, typename P05,
01192             typename P06, typename P07, typename P08, typename P09, typename P10,
01193             typename P11, typename P12, typename P13>
01194         struct IsMemberFunctionPointerRaw<T (S::*)(
01195             P01, P02, P03, P04, P05,
01196             P06, P07, P08, P09, P10,
01197             P11, P12, P13, ...) const> 
01198         {enum {result = 1};};
01199 
01200         template <typename T, typename S, 
01201             typename P01, typename P02, typename P03, typename P04, typename P05,
01202             typename P06, typename P07, typename P08, typename P09, typename P10,
01203             typename P11, typename P12, typename P13, typename P14>
01204         struct IsMemberFunctionPointerRaw<T (S::*)(
01205             P01, P02, P03, P04, P05,
01206             P06, P07, P08, P09, P10,
01207             P11, P12, P13, P14, ...) const> 
01208         {enum {result = 1};};
01209 
01210         template <typename T, typename S, 
01211             typename P01, typename P02, typename P03, typename P04, typename P05,
01212             typename P06, typename P07, typename P08, typename P09, typename P10,
01213             typename P11, typename P12, typename P13, typename P14, typename P15>
01214         struct IsMemberFunctionPointerRaw<T (S::*)(
01215             P01, P02, P03, P04, P05,
01216             P06, P07, P08, P09, P10,
01217             P11, P12, P13, P14, P15,
01218             ...) const> 
01219         {enum {result = 1};};
01220 
01221         template <typename T, typename S, 
01222             typename P01, typename P02, typename P03, typename P04, typename P05,
01223             typename P06, typename P07, typename P08, typename P09, typename P10,
01224             typename P11, typename P12, typename P13, typename P14, typename P15,
01225             typename P16>
01226         struct IsMemberFunctionPointerRaw<T (S::*)(
01227             P01, P02, P03, P04, P05, 
01228             P06, P07, P08, P09, P10, 
01229             P11, P12, P13, P14, P15,
01230             P16, ...) const> 
01231         {enum {result = 1};};
01232 
01233         template <typename T, typename S, 
01234             typename P01, typename P02, typename P03, typename P04, typename P05,
01235             typename P06, typename P07, typename P08, typename P09, typename P10,
01236             typename P11, typename P12, typename P13, typename P14, typename P15,
01237             typename P16, typename P17>
01238         struct IsMemberFunctionPointerRaw<T (S::*)(
01239             P01, P02, P03, P04, P05, 
01240             P06, P07, P08, P09, P10, 
01241             P11, P12, P13, P14, P15,
01242             P16, P17, ...) const> 
01243         {enum {result = 1};};
01244 
01245         template <typename T, typename S, 
01246             typename P01, typename P02, typename P03, typename P04, typename P05,
01247             typename P06, typename P07, typename P08, typename P09, typename P10,
01248             typename P11, typename P12, typename P13, typename P14, typename P15,
01249             typename P16, typename P17, typename P18>
01250         struct IsMemberFunctionPointerRaw<T (S::*)(
01251             P01, P02, P03, P04, P05, 
01252             P06, P07, P08, P09, P10, 
01253             P11, P12, P13, P14, P15,
01254             P16, P17, P18, ...) const> 
01255         {enum {result = 1};};
01256 
01257         template <typename T, typename S, 
01258             typename P01, typename P02, typename P03, typename P04, typename P05,
01259             typename P06, typename P07, typename P08, typename P09, typename P10,
01260             typename P11, typename P12, typename P13, typename P14, typename P15,
01261             typename P16, typename P17, typename P18, typename P19>
01262         struct IsMemberFunctionPointerRaw<T (S::*)(
01263             P01, P02, P03, P04, P05, 
01264             P06, P07, P08, P09, P10, 
01265             P11, P12, P13, P14, P15,
01266             P16, P17, P18, P19, ...) const> 
01267         {enum {result = 1};};
01268 
01269         template <typename T, typename S, 
01270             typename P01, typename P02, typename P03, typename P04, typename P05,
01271             typename P06, typename P07, typename P08, typename P09, typename P10,
01272             typename P11, typename P12, typename P13, typename P14, typename P15,
01273             typename P16, typename P17, typename P18, typename P19, typename P20>
01274         struct IsMemberFunctionPointerRaw<T (S::*)(
01275             P01, P02, P03, P04, P05, 
01276             P06, P07, P08, P09, P10, 
01277             P11, P12, P13, P14, P15,
01278             P16, P17, P18, P19, P20,
01279             ...) const> 
01280         {enum {result = 1};};
01281 
01282         // Volatile versions
01283 
01284         template <typename T, typename S>
01285         struct IsMemberFunctionPointerRaw<T (S::*)() volatile> 
01286         {enum {result = 1};};
01287 
01288         template <typename T, typename S, 
01289             typename P01>
01290         struct IsMemberFunctionPointerRaw<T (S::*)(P01) volatile> 
01291         {enum {result = 1};};
01292 
01293         template <typename T, typename S, 
01294             typename P01, typename P02>
01295         struct IsMemberFunctionPointerRaw<T (S::*)(
01296             P01, P02) volatile> 
01297         {enum {result = 1};};
01298 
01299         template <typename T, typename S, 
01300             typename P01, typename P02, typename P03>
01301         struct IsMemberFunctionPointerRaw<T (S::*)(
01302             P01, P02, P03) volatile> 
01303         {enum {result = 1};};
01304 
01305         template <typename T, typename S, 
01306             typename P01, typename P02, typename P03, typename P04>
01307         struct IsMemberFunctionPointerRaw<T (S::*)(
01308             P01, P02, P03, P04) volatile> 
01309         {enum {result = 1};};
01310 
01311         template <typename T, typename S, 
01312             typename P01, typename P02, typename P03, typename P04, typename P05>
01313         struct IsMemberFunctionPointerRaw<T (S::*)(
01314             P01, P02, P03, P04, P05) volatile> 
01315         {enum {result = 1};};
01316 
01317         template <typename T, typename S, 
01318             typename P01, typename P02, typename P03, typename P04, typename P05,
01319             typename P06>
01320         struct IsMemberFunctionPointerRaw<T (S::*)(
01321             P01, P02, P03, P04, P05, 
01322             P06) volatile> 
01323         {enum {result = 1};};
01324 
01325         template <typename T, typename S, 
01326             typename P01, typename P02, typename P03, typename P04, typename P05,
01327             typename P06, typename P07>
01328         struct IsMemberFunctionPointerRaw<T (S::*)(
01329             P01, P02, P03, P04, P05,
01330             P06, P07) volatile> 
01331         {enum {result = 1};};
01332 
01333         template <typename T, typename S, 
01334             typename P01, typename P02, typename P03, typename P04, typename P05,
01335             typename P06, typename P07, typename P08>
01336         struct IsMemberFunctionPointerRaw<T (S::*)(
01337             P01, P02, P03, P04, P05,
01338             P06, P07, P08) volatile> 
01339         {enum {result = 1};};
01340 
01341         template <typename T, typename S, 
01342             typename P01, typename P02, typename P03, typename P04, typename P05,
01343             typename P06, typename P07, typename P08, typename P09>
01344         struct IsMemberFunctionPointerRaw<T (S::*)(
01345             P01, P02, P03, P04, P05,
01346             P06, P07, P08, P09) volatile> 
01347         {enum {result = 1};};
01348 
01349         template <typename T, typename S, 
01350             typename P01, typename P02, typename P03, typename P04, typename P05,
01351             typename P06, typename P07, typename P08, typename P09, typename P10>
01352         struct IsMemberFunctionPointerRaw<T (S::*)(
01353             P01, P02, P03, P04, P05,
01354             P06, P07, P08, P09, P10) volatile> 
01355         {enum {result = 1};};
01356 
01357         template <typename T, typename S, 
01358             typename P01, typename P02, typename P03, typename P04, typename P05,
01359             typename P06, typename P07, typename P08, typename P09, typename P10,
01360             typename P11>
01361         struct IsMemberFunctionPointerRaw<T (S::*)(
01362             P01, P02, P03, P04, P05,
01363             P06, P07, P08, P09, P10,
01364             P11) volatile> 
01365         {enum {result = 1};};
01366 
01367         template <typename T, typename S, 
01368             typename P01, typename P02, typename P03, typename P04, typename P05,
01369             typename P06, typename P07, typename P08, typename P09, typename P10,
01370             typename P11, typename P12>
01371         struct IsMemberFunctionPointerRaw<T (S::*)(
01372             P01, P02, P03, P04, P05,
01373             P06, P07, P08, P09, P10,
01374             P11, P12) volatile> 
01375         {enum {result = 1};};
01376 
01377         template <typename T, typename S, 
01378             typename P01, typename P02, typename P03, typename P04, typename P05,
01379             typename P06, typename P07, typename P08, typename P09, typename P10,
01380             typename P11, typename P12, typename P13>
01381         struct IsMemberFunctionPointerRaw<T (S::*)(
01382             P01, P02, P03, P04, P05,
01383             P06, P07, P08, P09, P10,
01384             P11, P12, P13) volatile> 
01385         {enum {result = 1};};
01386 
01387         template <typename T, typename S, 
01388             typename P01, typename P02, typename P03, typename P04, typename P05,
01389             typename P06, typename P07, typename P08, typename P09, typename P10,
01390             typename P11, typename P12, typename P13, typename P14>
01391         struct IsMemberFunctionPointerRaw<T (S::*)(
01392             P01, P02, P03, P04, P05,
01393             P06, P07, P08, P09, P10,
01394             P11, P12, P13, P14) volatile> 
01395         {enum {result = 1};};
01396 
01397         template <typename T, typename S, 
01398             typename P01, typename P02, typename P03, typename P04, typename P05,
01399             typename P06, typename P07, typename P08, typename P09, typename P10,
01400             typename P11, typename P12, typename P13, typename P14, typename P15>
01401         struct IsMemberFunctionPointerRaw<T (S::*)(
01402             P01, P02, P03, P04, P05,
01403             P06, P07, P08, P09, P10,
01404             P11, P12, P13, P14, P15) volatile> 
01405         {enum {result = 1};};
01406 
01407         template <typename T, typename S, 
01408             typename P01, typename P02, typename P03, typename P04, typename P05,
01409             typename P06, typename P07, typename P08, typename P09, typename P10,
01410             typename P11, typename P12, typename P13, typename P14, typename P15,
01411             typename P16>
01412         struct IsMemberFunctionPointerRaw<T (S::*)(
01413             P01, P02, P03, P04, P05, 
01414             P06, P07, P08, P09, P10, 
01415             P11, P12, P13, P14, P15,
01416             P16) volatile> 
01417         {enum {result = 1};};
01418 
01419         template <typename T, typename S, 
01420             typename P01, typename P02, typename P03, typename P04, typename P05,
01421             typename P06, typename P07, typename P08, typename P09, typename P10,
01422             typename P11, typename P12, typename P13, typename P14, typename P15,
01423             typename P16, typename P17>
01424         struct IsMemberFunctionPointerRaw<T (S::*)(
01425             P01, P02, P03, P04, P05, 
01426             P06, P07, P08, P09, P10, 
01427             P11, P12, P13, P14, P15,
01428             P16, P17) volatile> 
01429         {enum {result = 1};};
01430 
01431         template <typename T, typename S, 
01432             typename P01, typename P02, typename P03, typename P04, typename P05,
01433             typename P06, typename P07, typename P08, typename P09, typename P10,
01434             typename P11, typename P12, typename P13, typename P14, typename P15,
01435             typename P16, typename P17, typename P18>
01436         struct IsMemberFunctionPointerRaw<T (S::*)(
01437             P01, P02, P03, P04, P05, 
01438             P06, P07, P08, P09, P10, 
01439             P11, P12, P13, P14, P15,
01440             P16, P17, P18) volatile> 
01441         {enum {result = 1};};
01442 
01443         template <typename T, typename S, 
01444             typename P01, typename P02, typename P03, typename P04, typename P05,
01445             typename P06, typename P07, typename P08, typename P09, typename P10,
01446             typename P11, typename P12, typename P13, typename P14, typename P15,
01447             typename P16, typename P17, typename P18, typename P19>
01448         struct IsMemberFunctionPointerRaw<T (S::*)(
01449             P01, P02, P03, P04, P05, 
01450             P06, P07, P08, P09, P10, 
01451             P11, P12, P13, P14, P15,
01452             P16, P17, P18, P19) volatile> 
01453         {enum {result = 1};};
01454 
01455         template <typename T, typename S, 
01456             typename P01, typename P02, typename P03, typename P04, typename P05,
01457             typename P06, typename P07, typename P08, typename P09, typename P10,
01458             typename P11, typename P12, typename P13, typename P14, typename P15,
01459             typename P16, typename P17, typename P18, typename P19, typename P20>
01460         struct IsMemberFunctionPointerRaw<T (S::*)(
01461             P01, P02, P03, P04, P05, 
01462             P06, P07, P08, P09, P10, 
01463             P11, P12, P13, P14, P15,
01464             P16, P17, P18, P19, P20) volatile> 
01465         {enum {result = 1};};
01466 
01467         template <typename T, typename S>
01468         struct IsMemberFunctionPointerRaw<T (S::*)(
01469             ...) volatile> 
01470         {enum {result = 1};};
01471 
01472         template <typename T, typename S, 
01473             typename P01>
01474         struct IsMemberFunctionPointerRaw<T (S::*)(
01475             P01, ...) volatile> 
01476         {enum {result = 1};};
01477 
01478         template <typename T, typename S, 
01479             typename P01, typename P02>
01480         struct IsMemberFunctionPointerRaw<T (S::*)(
01481             P01, P02, ...) volatile> 
01482         {enum {result = 1};};
01483 
01484         template <typename T, typename S, 
01485             typename P01, typename P02, typename P03>
01486         struct IsMemberFunctionPointerRaw<T (S::*)(
01487             P01, P02, P03, ...) volatile> 
01488         {enum {result = 1};};
01489 
01490         template <typename T, typename S, 
01491             typename P01, typename P02, typename P03, typename P04>
01492         struct IsMemberFunctionPointerRaw<T (S::*)(
01493             P01, P02, P03, P04, ...) volatile> 
01494         {enum {result = 1};};
01495 
01496         template <typename T, typename S, 
01497             typename P01, typename P02, typename P03, typename P04, typename P05>
01498         struct IsMemberFunctionPointerRaw<T (S::*)(
01499             P01, P02, P03, P04, P05,
01500             ...) volatile> 
01501         {enum {result = 1};};
01502 
01503         template <typename T, typename S, 
01504             typename P01, typename P02, typename P03, typename P04, typename P05,
01505             typename P06>
01506         struct IsMemberFunctionPointerRaw<T (S::*)(
01507             P01, P02, P03, P04, P05, 
01508             P06, ...) volatile> 
01509         {enum {result = 1};};
01510 
01511         template <typename T, typename S, 
01512             typename P01, typename P02, typename P03, typename P04, typename P05,
01513             typename P06, typename P07>
01514         struct IsMemberFunctionPointerRaw<T (S::*)(
01515             P01, P02, P03, P04, P05,
01516             P06, P07, ...) volatile> 
01517         {enum {result = 1};};
01518 
01519         template <typename T, typename S, 
01520             typename P01, typename P02, typename P03, typename P04, typename P05,
01521             typename P06, typename P07, typename P08>
01522         struct IsMemberFunctionPointerRaw<T (S::*)(
01523             P01, P02, P03, P04, P05,
01524             P06, P07, P08, ...) volatile> 
01525         {enum {result = 1};};
01526 
01527         template <typename T, typename S, 
01528             typename P01, typename P02, typename P03, typename P04, typename P05,
01529             typename P06, typename P07, typename P08, typename P09>
01530         struct IsMemberFunctionPointerRaw<T (S::*)(
01531             P01, P02, P03, P04, P05,
01532             P06, P07, P08, P09, ...) volatile> 
01533         {enum {result = 1};};
01534 
01535         template <typename T, typename S, 
01536             typename P01, typename P02, typename P03, typename P04, typename P05,
01537             typename P06, typename P07, typename P08, typename P09, typename P10>
01538         struct IsMemberFunctionPointerRaw<T (S::*)(
01539             P01, P02, P03, P04, P05,
01540             P06, P07, P08, P09, P10,
01541             ...) volatile> 
01542         {enum {result = 1};};
01543 
01544         template <typename T, typename S, 
01545             typename P01, typename P02, typename P03, typename P04, typename P05,
01546             typename P06, typename P07, typename P08, typename P09, typename P10,
01547             typename P11>
01548         struct IsMemberFunctionPointerRaw<T (S::*)(
01549             P01, P02, P03, P04, P05,
01550             P06, P07, P08, P09, P10,
01551             P11, ...) volatile> 
01552         {enum {result = 1};};
01553 
01554         template <typename T, typename S, 
01555             typename P01, typename P02, typename P03, typename P04, typename P05,
01556             typename P06, typename P07, typename P08, typename P09, typename P10,
01557             typename P11, typename P12>
01558         struct IsMemberFunctionPointerRaw<T (S::*)(
01559             P01, P02, P03, P04, P05,
01560             P06, P07, P08, P09, P10,
01561             P11, P12, ...) volatile> 
01562         {enum {result = 1};};
01563 
01564         template <typename T, typename S, 
01565             typename P01, typename P02, typename P03, typename P04, typename P05,
01566             typename P06, typename P07, typename P08, typename P09, typename P10,
01567             typename P11, typename P12, typename P13>
01568         struct IsMemberFunctionPointerRaw<T (S::*)(
01569             P01, P02, P03, P04, P05,
01570             P06, P07, P08, P09, P10,
01571             P11, P12, P13, ...) volatile> 
01572         {enum {result = 1};};
01573 
01574         template <typename T, typename S, 
01575             typename P01, typename P02, typename P03, typename P04, typename P05,
01576             typename P06, typename P07, typename P08, typename P09, typename P10,
01577             typename P11, typename P12, typename P13, typename P14>
01578         struct IsMemberFunctionPointerRaw<T (S::*)(
01579             P01, P02, P03, P04, P05,
01580             P06, P07, P08, P09, P10,
01581             P11, P12, P13, P14, ...) volatile> 
01582         {enum {result = 1};};
01583 
01584         template <typename T, typename S, 
01585             typename P01, typename P02, typename P03, typename P04, typename P05,
01586             typename P06, typename P07, typename P08, typename P09, typename P10,
01587             typename P11, typename P12, typename P13, typename P14, typename P15>
01588         struct IsMemberFunctionPointerRaw<T (S::*)(
01589             P01, P02, P03, P04, P05,
01590             P06, P07, P08, P09, P10,
01591             P11, P12, P13, P14, P15,
01592             ...) volatile> 
01593         {enum {result = 1};};
01594 
01595         template <typename T, typename S, 
01596             typename P01, typename P02, typename P03, typename P04, typename P05,
01597             typename P06, typename P07, typename P08, typename P09, typename P10,
01598             typename P11, typename P12, typename P13, typename P14, typename P15,
01599             typename P16>
01600         struct IsMemberFunctionPointerRaw<T (S::*)(
01601             P01, P02, P03, P04, P05, 
01602             P06, P07, P08, P09, P10, 
01603             P11, P12, P13, P14, P15,
01604             P16, ...) volatile> 
01605         {enum {result = 1};};
01606 
01607         template <typename T, typename S, 
01608             typename P01, typename P02, typename P03, typename P04, typename P05,
01609             typename P06, typename P07, typename P08, typename P09, typename P10,
01610             typename P11, typename P12, typename P13, typename P14, typename P15,
01611             typename P16, typename P17>
01612         struct IsMemberFunctionPointerRaw<T (S::*)(
01613             P01, P02, P03, P04, P05, 
01614             P06, P07, P08, P09, P10, 
01615             P11, P12, P13, P14, P15,
01616             P16, P17, ...) volatile> 
01617         {enum {result = 1};};
01618 
01619         template <typename T, typename S, 
01620             typename P01, typename P02, typename P03, typename P04, typename P05,
01621             typename P06, typename P07, typename P08, typename P09, typename P10,
01622             typename P11, typename P12, typename P13, typename P14, typename P15,
01623             typename P16, typename P17, typename P18>
01624         struct IsMemberFunctionPointerRaw<T (S::*)(
01625             P01, P02, P03, P04, P05, 
01626             P06, P07, P08, P09, P10, 
01627             P11, P12, P13, P14, P15,
01628             P16, P17, P18, ...) volatile> 
01629         {enum {result = 1};};
01630 
01631         template <typename T, typename S, 
01632             typename P01, typename P02, typename P03, typename P04, typename P05,
01633             typename P06, typename P07, typename P08, typename P09, typename P10,
01634             typename P11, typename P12, typename P13, typename P14, typename P15,
01635             typename P16, typename P17, typename P18, typename P19>
01636         struct IsMemberFunctionPointerRaw<T (S::*)(
01637             P01, P02, P03, P04, P05, 
01638             P06, P07, P08, P09, P10, 
01639             P11, P12, P13, P14, P15,
01640             P16, P17, P18, P19, ...) volatile> 
01641         {enum {result = 1};};
01642 
01643         template <typename T, typename S, 
01644             typename P01, typename P02, typename P03, typename P04, typename P05,
01645             typename P06, typename P07, typename P08, typename P09, typename P10,
01646             typename P11, typename P12, typename P13, typename P14, typename P15,
01647             typename P16, typename P17, typename P18, typename P19, typename P20>
01648         struct IsMemberFunctionPointerRaw<T (S::*)(
01649             P01, P02, P03, P04, P05, 
01650             P06, P07, P08, P09, P10, 
01651             P11, P12, P13, P14, P15,
01652             P16, P17, P18, P19, P20,
01653             ...) volatile> 
01654         {enum {result = 1};};
01655 
01656         // Const volatile versions
01657 
01658         template <typename T, typename S>
01659         struct IsMemberFunctionPointerRaw<T (S::*)() const volatile> 
01660         {enum {result = 1};};
01661 
01662         template <typename T, typename S, 
01663             typename P01>
01664         struct IsMemberFunctionPointerRaw<T (S::*)(P01) const volatile> 
01665         {enum {result = 1};};
01666 
01667         template <typename T, typename S, 
01668             typename P01, typename P02>
01669         struct IsMemberFunctionPointerRaw<T (S::*)(
01670             P01, P02) const volatile> 
01671         {enum {result = 1};};
01672 
01673         template <typename T, typename S, 
01674             typename P01, typename P02, typename P03>
01675         struct IsMemberFunctionPointerRaw<T (S::*)(
01676             P01, P02, P03) const volatile> 
01677         {enum {result = 1};};
01678 
01679         template <typename T, typename S, 
01680             typename P01, typename P02, typename P03, typename P04>
01681         struct IsMemberFunctionPointerRaw<T (S::*)(
01682             P01, P02, P03, P04) const volatile> 
01683         {enum {result = 1};};
01684 
01685         template <typename T, typename S, 
01686             typename P01, typename P02, typename P03, typename P04, typename P05>
01687         struct IsMemberFunctionPointerRaw<T (S::*)(
01688             P01, P02, P03, P04, P05) const volatile> 
01689         {enum {result = 1};};
01690 
01691         template <typename T, typename S, 
01692             typename P01, typename P02, typename P03, typename P04, typename P05,
01693             typename P06>
01694         struct IsMemberFunctionPointerRaw<T (S::*)(
01695             P01, P02, P03, P04, P05, 
01696             P06) const volatile> 
01697         {enum {result = 1};};
01698 
01699         template <typename T, typename S, 
01700             typename P01, typename P02, typename P03, typename P04, typename P05,
01701             typename P06, typename P07>
01702         struct IsMemberFunctionPointerRaw<T (S::*)(
01703             P01, P02, P03, P04, P05,
01704             P06, P07) const volatile> 
01705         {enum {result = 1};};
01706 
01707         template <typename T, typename S, 
01708             typename P01, typename P02, typename P03, typename P04, typename P05,
01709             typename P06, typename P07, typename P08>
01710         struct IsMemberFunctionPointerRaw<T (S::*)(
01711             P01, P02, P03, P04, P05,
01712             P06, P07, P08) const volatile> 
01713         {enum {result = 1};};
01714 
01715         template <typename T, typename S, 
01716             typename P01, typename P02, typename P03, typename P04, typename P05,
01717             typename P06, typename P07, typename P08, typename P09>
01718         struct IsMemberFunctionPointerRaw<T (S::*)(
01719             P01, P02, P03, P04, P05,
01720             P06, P07, P08, P09) const volatile> 
01721         {enum {result = 1};};
01722 
01723         template <typename T, typename S, 
01724             typename P01, typename P02, typename P03, typename P04, typename P05,
01725             typename P06, typename P07, typename P08, typename P09, typename P10>
01726         struct IsMemberFunctionPointerRaw<T (S::*)(
01727             P01, P02, P03, P04, P05,
01728             P06, P07, P08, P09, P10) const volatile> 
01729         {enum {result = 1};};
01730 
01731         template <typename T, typename S, 
01732             typename P01, typename P02, typename P03, typename P04, typename P05,
01733             typename P06, typename P07, typename P08, typename P09, typename P10,
01734             typename P11>
01735         struct IsMemberFunctionPointerRaw<T (S::*)(
01736             P01, P02, P03, P04, P05,
01737             P06, P07, P08, P09, P10,
01738             P11) const volatile> 
01739         {enum {result = 1};};
01740 
01741         template <typename T, typename S, 
01742             typename P01, typename P02, typename P03, typename P04, typename P05,
01743             typename P06, typename P07, typename P08, typename P09, typename P10,
01744             typename P11, typename P12>
01745         struct IsMemberFunctionPointerRaw<T (S::*)(
01746             P01, P02, P03, P04, P05,
01747             P06, P07, P08, P09, P10,
01748             P11, P12) const volatile> 
01749         {enum {result = 1};};
01750 
01751         template <typename T, typename S, 
01752             typename P01, typename P02, typename P03, typename P04, typename P05,
01753             typename P06, typename P07, typename P08, typename P09, typename P10,
01754             typename P11, typename P12, typename P13>
01755         struct IsMemberFunctionPointerRaw<T (S::*)(
01756             P01, P02, P03, P04, P05,
01757             P06, P07, P08, P09, P10,
01758             P11, P12, P13) const volatile> 
01759         {enum {result = 1};};
01760 
01761         template <typename T, typename S, 
01762             typename P01, typename P02, typename P03, typename P04, typename P05,
01763             typename P06, typename P07, typename P08, typename P09, typename P10,
01764             typename P11, typename P12, typename P13, typename P14>
01765         struct IsMemberFunctionPointerRaw<T (S::*)(
01766             P01, P02, P03, P04, P05,
01767             P06, P07, P08, P09, P10,
01768             P11, P12, P13, P14) const volatile> 
01769         {enum {result = 1};};
01770 
01771         template <typename T, typename S, 
01772             typename P01, typename P02, typename P03, typename P04, typename P05,
01773             typename P06, typename P07, typename P08, typename P09, typename P10,
01774             typename P11, typename P12, typename P13, typename P14, typename P15>
01775         struct IsMemberFunctionPointerRaw<T (S::*)(
01776             P01, P02, P03, P04, P05,
01777             P06, P07, P08, P09, P10,
01778             P11, P12, P13, P14, P15) const volatile> 
01779         {enum {result = 1};};
01780 
01781         template <typename T, typename S, 
01782             typename P01, typename P02, typename P03, typename P04, typename P05,
01783             typename P06, typename P07, typename P08, typename P09, typename P10,
01784             typename P11, typename P12, typename P13, typename P14, typename P15,
01785             typename P16>
01786         struct IsMemberFunctionPointerRaw<T (S::*)(
01787             P01, P02, P03, P04, P05, 
01788             P06, P07, P08, P09, P10, 
01789             P11, P12, P13, P14, P15,
01790             P16) const volatile> 
01791         {enum {result = 1};};
01792 
01793         template <typename T, typename S, 
01794             typename P01, typename P02, typename P03, typename P04, typename P05,
01795             typename P06, typename P07, typename P08, typename P09, typename P10,
01796             typename P11, typename P12, typename P13, typename P14, typename P15,
01797             typename P16, typename P17>
01798         struct IsMemberFunctionPointerRaw<T (S::*)(
01799             P01, P02, P03, P04, P05, 
01800             P06, P07, P08, P09, P10, 
01801             P11, P12, P13, P14, P15,
01802             P16, P17) const volatile> 
01803         {enum {result = 1};};
01804 
01805         template <typename T, typename S, 
01806             typename P01, typename P02, typename P03, typename P04, typename P05,
01807             typename P06, typename P07, typename P08, typename P09, typename P10,
01808             typename P11, typename P12, typename P13, typename P14, typename P15,
01809             typename P16, typename P17, typename P18>
01810         struct IsMemberFunctionPointerRaw<T (S::*)(
01811             P01, P02, P03, P04, P05, 
01812             P06, P07, P08, P09, P10, 
01813             P11, P12, P13, P14, P15,
01814             P16, P17, P18) const volatile> 
01815         {enum {result = 1};};
01816 
01817         template <typename T, typename S, 
01818             typename P01, typename P02, typename P03, typename P04, typename P05,
01819             typename P06, typename P07, typename P08, typename P09, typename P10,
01820             typename P11, typename P12, typename P13, typename P14, typename P15,
01821             typename P16, typename P17, typename P18, typename P19>
01822         struct IsMemberFunctionPointerRaw<T (S::*)(
01823             P01, P02, P03, P04, P05, 
01824             P06, P07, P08, P09, P10, 
01825             P11, P12, P13, P14, P15,
01826             P16, P17, P18, P19) const volatile> 
01827         {enum {result = 1};};
01828 
01829         template <typename T, typename S, 
01830             typename P01, typename P02, typename P03, typename P04, typename P05,
01831             typename P06, typename P07, typename P08, typename P09, typename P10,
01832             typename P11, typename P12, typename P13, typename P14, typename P15,
01833             typename P16, typename P17, typename P18, typename P19, typename P20>
01834         struct IsMemberFunctionPointerRaw<T (S::*)(
01835             P01, P02, P03, P04, P05, 
01836             P06, P07, P08, P09, P10, 
01837             P11, P12, P13, P14, P15,
01838             P16, P17, P18, P19, P20) const volatile> 
01839         {enum {result = 1};};
01840 
01841         template <typename T, typename S>
01842         struct IsMemberFunctionPointerRaw<T (S::*)(
01843             ...) const volatile> 
01844         {enum {result = 1};};
01845 
01846         template <typename T, typename S, 
01847             typename P01>
01848         struct IsMemberFunctionPointerRaw<T (S::*)(
01849             P01, ...) const volatile> 
01850         {enum {result = 1};};
01851 
01852         template <typename T, typename S, 
01853             typename P01, typename P02>
01854         struct IsMemberFunctionPointerRaw<T (S::*)(
01855             P01, P02, ...) const volatile> 
01856         {enum {result = 1};};
01857 
01858         template <typename T, typename S, 
01859             typename P01, typename P02, typename P03>
01860         struct IsMemberFunctionPointerRaw<T (S::*)(
01861             P01, P02, P03, ...) const volatile> 
01862         {enum {result = 1};};
01863 
01864         template <typename T, typename S, 
01865             typename P01, typename P02, typename P03, typename P04>
01866         struct IsMemberFunctionPointerRaw<T (S::*)(
01867             P01, P02, P03, P04, ...) const volatile> 
01868         {enum {result = 1};};
01869 
01870         template <typename T, typename S, 
01871             typename P01, typename P02, typename P03, typename P04, typename P05>
01872         struct IsMemberFunctionPointerRaw<T (S::*)(
01873             P01, P02, P03, P04, P05,
01874             ...) const volatile> 
01875         {enum {result = 1};};
01876 
01877         template <typename T, typename S, 
01878             typename P01, typename P02, typename P03, typename P04, typename P05,
01879             typename P06>
01880         struct IsMemberFunctionPointerRaw<T (S::*)(
01881             P01, P02, P03, P04, P05, 
01882             P06, ...) const volatile> 
01883         {enum {result = 1};};
01884 
01885         template <typename T, typename S, 
01886             typename P01, typename P02, typename P03, typename P04, typename P05,
01887             typename P06, typename P07>
01888         struct IsMemberFunctionPointerRaw<T (S::*)(
01889             P01, P02, P03, P04, P05,
01890             P06, P07, ...) const volatile> 
01891         {enum {result = 1};};
01892 
01893         template <typename T, typename S, 
01894             typename P01, typename P02, typename P03, typename P04, typename P05,
01895             typename P06, typename P07, typename P08>
01896         struct IsMemberFunctionPointerRaw<T (S::*)(
01897             P01, P02, P03, P04, P05,
01898             P06, P07, P08, ...) const volatile> 
01899         {enum {result = 1};};
01900 
01901         template <typename T, typename S, 
01902             typename P01, typename P02, typename P03, typename P04, typename P05,
01903             typename P06, typename P07, typename P08, typename P09>
01904         struct IsMemberFunctionPointerRaw<T (S::*)(
01905             P01, P02, P03, P04, P05,
01906             P06, P07, P08, P09, ...) const volatile> 
01907         {enum {result = 1};};
01908 
01909         template <typename T, typename S, 
01910             typename P01, typename P02, typename P03, typename P04, typename P05,
01911             typename P06, typename P07, typename P08, typename P09, typename P10>
01912         struct IsMemberFunctionPointerRaw<T (S::*)(
01913             P01, P02, P03, P04, P05,
01914             P06, P07, P08, P09, P10,
01915             ...) const volatile> 
01916         {enum {result = 1};};
01917 
01918         template <typename T, typename S, 
01919             typename P01, typename P02, typename P03, typename P04, typename P05,
01920             typename P06, typename P07, typename P08, typename P09, typename P10,
01921             typename P11>
01922         struct IsMemberFunctionPointerRaw<T (S::*)(
01923             P01, P02, P03, P04, P05,
01924             P06, P07, P08, P09, P10,
01925             P11, ...) const volatile> 
01926         {enum {result = 1};};
01927 
01928         template <typename T, typename S, 
01929             typename P01, typename P02, typename P03, typename P04, typename P05,
01930             typename P06, typename P07, typename P08, typename P09, typename P10,
01931             typename P11, typename P12>
01932         struct IsMemberFunctionPointerRaw<T (S::*)(
01933             P01, P02, P03, P04, P05,
01934             P06, P07, P08, P09, P10,
01935             P11, P12, ...) const volatile> 
01936         {enum {result = 1};};
01937 
01938         template <typename T, typename S, 
01939             typename P01, typename P02, typename P03, typename P04, typename P05,
01940             typename P06, typename P07, typename P08, typename P09, typename P10,
01941             typename P11, typename P12, typename P13>
01942         struct IsMemberFunctionPointerRaw<T (S::*)(
01943             P01, P02, P03, P04, P05,
01944             P06, P07, P08, P09, P10,
01945             P11, P12, P13, ...) const volatile> 
01946         {enum {result = 1};};
01947 
01948         template <typename T, typename S, 
01949             typename P01, typename P02, typename P03, typename P04, typename P05,
01950             typename P06, typename P07, typename P08, typename P09, typename P10,
01951             typename P11, typename P12, typename P13, typename P14>
01952         struct IsMemberFunctionPointerRaw<T (S::*)(
01953             P01, P02, P03, P04, P05,
01954             P06, P07, P08, P09, P10,
01955             P11, P12, P13, P14, ...) const volatile> 
01956         {enum {result = 1};};
01957 
01958         template <typename T, typename S, 
01959             typename P01, typename P02, typename P03, typename P04, typename P05,
01960             typename P06, typename P07, typename P08, typename P09, typename P10,
01961             typename P11, typename P12, typename P13, typename P14, typename P15>
01962         struct IsMemberFunctionPointerRaw<T (S::*)(
01963             P01, P02, P03, P04, P05,
01964             P06, P07, P08, P09, P10,
01965             P11, P12, P13, P14, P15,
01966             ...) const volatile> 
01967         {enum {result = 1};};
01968 
01969         template <typename T, typename S, 
01970             typename P01, typename P02, typename P03, typename P04, typename P05,
01971             typename P06, typename P07, typename P08, typename P09, typename P10,
01972             typename P11, typename P12, typename P13, typename P14, typename P15,
01973             typename P16>
01974         struct IsMemberFunctionPointerRaw<T (S::*)(
01975             P01, P02, P03, P04, P05, 
01976             P06, P07, P08, P09, P10, 
01977             P11, P12, P13, P14, P15,
01978             P16, ...) const volatile> 
01979         {enum {result = 1};};
01980 
01981         template <typename T, typename S, 
01982             typename P01, typename P02, typename P03, typename P04, typename P05,
01983             typename P06, typename P07, typename P08, typename P09, typename P10,
01984             typename P11, typename P12, typename P13, typename P14, typename P15,
01985             typename P16, typename P17>
01986         struct IsMemberFunctionPointerRaw<T (S::*)(
01987             P01, P02, P03, P04, P05, 
01988             P06, P07, P08, P09, P10, 
01989             P11, P12, P13, P14, P15,
01990             P16, P17, ...) const volatile> 
01991         {enum {result = 1};};
01992 
01993         template <typename T, typename S, 
01994             typename P01, typename P02, typename P03, typename P04, typename P05,
01995             typename P06, typename P07, typename P08, typename P09, typename P10,
01996             typename P11, typename P12, typename P13, typename P14, typename P15,
01997             typename P16, typename P17, typename P18>
01998         struct IsMemberFunctionPointerRaw<T (S::*)(
01999             P01, P02, P03, P04, P05, 
02000             P06, P07, P08, P09, P10, 
02001             P11, P12, P13, P14, P15,
02002             P16, P17, P18, ...) const volatile> 
02003         {enum {result = 1};};
02004 
02005         template <typename T, typename S, 
02006             typename P01, typename P02, typename P03, typename P04, typename P05,
02007             typename P06, typename P07, typename P08, typename P09, typename P10,
02008             typename P11, typename P12, typename P13, typename P14, typename P15,
02009             typename P16, typename P17, typename P18, typename P19>
02010         struct IsMemberFunctionPointerRaw<T (S::*)(
02011             P01, P02, P03, P04, P05, 
02012             P06, P07, P08, P09, P10, 
02013             P11, P12, P13, P14, P15,
02014             P16, P17, P18, P19, ...) const volatile> 
02015         {enum {result = 1};};
02016 
02017         template <typename T, typename S, 
02018             typename P01, typename P02, typename P03, typename P04, typename P05,
02019             typename P06, typename P07, typename P08, typename P09, typename P10,
02020             typename P11, typename P12, typename P13, typename P14, typename P15,
02021             typename P16, typename P17, typename P18, typename P19, typename P20>
02022         struct IsMemberFunctionPointerRaw<T (S::*)(
02023             P01, P02, P03, P04, P05, 
02024             P06, P07, P08, P09, P10, 
02025             P11, P12, P13, P14, P15,
02026             P16, P17, P18, P19, P20,
02027             ...) const volatile> 
02028         {enum {result = 1};};
02029                
02030       }// namespace Private
02031         
02033 // class template TypeTraits
02034 //
02035 // Figures out at compile time various properties of any given type
02036 // Invocations (T is a type, TypeTraits<T>::Propertie):
02037 //
02038 // - isPointer       : returns true if T is a pointer type
02039 // - PointeeType     : returns the type to which T points if T is a pointer 
02040 //                     type, NullType otherwise
02041 // - isReference     : returns true if T is a reference type
02042 // - ReferredType    : returns the type to which T refers if T is a reference 
02043 //                     type, NullType otherwise
02044 // - isMemberPointer : returns true if T is a pointer to member type
02045 // - isStdUnsignedInt: returns true if T is a standard unsigned integral type
02046 // - isStdSignedInt  : returns true if T is a standard signed integral type
02047 // - isStdIntegral   : returns true if T is a standard integral type
02048 // - isStdFloat      : returns true if T is a standard floating-point type
02049 // - isStdArith      : returns true if T is a standard arithmetic type
02050 // - isStdFundamental: returns true if T is a standard fundamental type
02051 // - isUnsignedInt   : returns true if T is a unsigned integral type
02052 // - isSignedInt     : returns true if T is a signed integral type
02053 // - isIntegral      : returns true if T is a integral type
02054 // - isFloat         : returns true if T is a floating-point type
02055 // - isArith         : returns true if T is a arithmetic type
02056 // - isFundamental   : returns true if T is a fundamental type
02057 // - ParameterType   : returns the optimal type to be used as a parameter for 
02058 //                     functions that take Ts
02059 // - isConst         : returns true if T is a const-qualified type
02060 // - NonConstType    : Type with removed 'const' qualifier from T, if any
02061 // - isVolatile      : returns true if T is a volatile-qualified type
02062 // - NonVolatileType : Type with removed 'volatile' qualifier from T, if any
02063 // - UnqualifiedType : Type with removed 'const' and 'volatile' qualifiers from 
02064 //                     T, if any
02065 // - ConstParameterType: returns the optimal type to be used as a parameter 
02066 //                       for functions that take 'const T's
02067 //
02069 
02070     template <typename T>
02071     class TypeTraits
02072     {
02073     private:
02074     
02075         template <class U> struct ReferenceTraits
02076         {
02077             enum { result = false };
02078             typedef U ReferredType;
02079         };
02080         
02081         template <class U> struct ReferenceTraits<U&>
02082         {
02083             enum { result = true };
02084             typedef U ReferredType;
02085         };
02086                
02087         template <class U> struct PointerTraits
02088         {
02089             enum { result = false };
02090             typedef NullType PointeeType;
02091         };
02092         
02093         template <class U> struct PointerTraits<U*>
02094         {
02095             enum { result = true };
02096             typedef U PointeeType;
02097         };
02098         
02099         template <class U> struct PointerTraits<U*&>
02100         {
02101             enum { result = true };
02102             typedef U PointeeType;
02103         };
02104           
02105         template <class U> struct PToMTraits
02106         {
02107             enum { result = false };
02108         };
02109         
02110         template <class U, class V> struct PToMTraits<U V::*>
02111         {
02112             enum { result = true };
02113         };
02114         
02115         template <class U, class V> struct PToMTraits<U V::*&>
02116         {
02117             enum { result = true };
02118         };
02119         
02120         template <class U> struct FunctionPointerTraits
02121         {
02122             enum{ result = Private::IsFunctionPointerRaw<U>::result };
02123         };
02124         
02125         template <typename U> struct PToMFunctionTraits
02126         {
02127             enum{ result = Private::IsMemberFunctionPointerRaw<U>::result };
02128         };
02129          
02130         template <class U> struct UnConst
02131         {
02132             typedef U Result;
02133             enum { isConst = 0 };
02134         };
02135         
02136         template <class U> struct UnConst<const U>
02137         {
02138             typedef U Result;
02139             enum { isConst = 1 };
02140         };
02141 
02142         template <class U> struct UnConst<const U&>
02143         {
02144             typedef U& Result;
02145             enum { isConst = 1 };
02146         };
02147   
02148         template <class U> struct UnVolatile
02149         {
02150             typedef U Result;
02151             enum { isVolatile = 0 };
02152         };
02153        
02154         template <class U> struct UnVolatile<volatile U>
02155         {
02156             typedef U Result;
02157             enum { isVolatile = 1 };
02158         };
02159 
02160         template <class U> struct UnVolatile<volatile U&>
02161         {
02162             typedef U& Result;
02163             enum { isVolatile = 1 };
02164         };
02165         
02166     public:
02167         typedef typename UnConst<T>::Result 
02168             NonConstType;
02169         typedef typename UnVolatile<T>::Result 
02170             NonVolatileType;
02171         typedef typename UnVolatile<typename UnConst<T>::Result>::Result 
02172             UnqualifiedType;
02173         typedef typename PointerTraits<UnqualifiedType>::PointeeType 
02174             PointeeType;
02175         typedef typename ReferenceTraits<T>::ReferredType 
02176             ReferredType;
02177 
02178         enum { isConst          = UnConst<T>::isConst };
02179         enum { isVolatile       = UnVolatile<T>::isVolatile };
02180         enum { isReference      = ReferenceTraits<UnqualifiedType>::result };
02181         enum { isFunction       = FunctionPointerTraits<typename Private::AddPointer<T>::Result >::result };
02182         enum { isFunctionPointer= FunctionPointerTraits<
02183                                         typename ReferenceTraits<UnqualifiedType>::ReferredType >::result };
02184         enum { isMemberFunctionPointer= PToMFunctionTraits<
02185                                         typename ReferenceTraits<UnqualifiedType>::ReferredType >::result };
02186         enum { isMemberPointer  = PToMTraits<
02187                                         typename ReferenceTraits<UnqualifiedType>::ReferredType >::result ||
02188                                         isMemberFunctionPointer };
02189         enum { isPointer        = PointerTraits<
02190                                         typename ReferenceTraits<UnqualifiedType>::ReferredType >::result ||
02191                                         isFunctionPointer };
02192         
02193         enum { isStdUnsignedInt = TL::IndexOf<Private::StdUnsignedInts, UnqualifiedType>::value >= 0 ||
02194                                   TL::IndexOf<Private::StdUnsignedInts, 
02195                                         typename ReferenceTraits<UnqualifiedType>::ReferredType>::value >= 0};
02196         enum { isStdSignedInt   = TL::IndexOf<Private::StdSignedInts, UnqualifiedType>::value >= 0 ||
02197                                   TL::IndexOf<Private::StdSignedInts, 
02198                                         typename ReferenceTraits<UnqualifiedType>::ReferredType>::value >= 0};
02199         enum { isStdIntegral    = isStdUnsignedInt || isStdSignedInt ||
02200                                   TL::IndexOf<Private::StdOtherInts, UnqualifiedType>::value >= 0 ||
02201                                   TL::IndexOf<Private::StdOtherInts, 
02202                                         typename ReferenceTraits<UnqualifiedType>::ReferredType>::value >= 0};
02203         enum { isStdFloat       = TL::IndexOf<Private::StdFloats, UnqualifiedType>::value >= 0 ||
02204                                   TL::IndexOf<Private::StdFloats, 
02205                                         typename ReferenceTraits<UnqualifiedType>::ReferredType>::value >= 0};
02206         enum { isStdArith       = isStdIntegral || isStdFloat };
02207         enum { isStdFundamental = isStdArith || isStdFloat || Conversion<T, void>::sameType };
02208             
02209         enum { isUnsignedInt    = isStdUnsignedInt || IsCustomUnsignedInt<UnqualifiedType>::value };
02210         enum { isSignedInt      = isStdSignedInt || IsCustomSignedInt<UnqualifiedType>::value };
02211         enum { isIntegral       = isStdIntegral || isUnsignedInt || isSignedInt };
02212         enum { isFloat          = isStdFloat || IsCustomFloat<UnqualifiedType>::value };
02213         enum { isArith          = isIntegral || isFloat };
02214         enum { isFundamental    = isStdFundamental || isArith };
02215         
02216         typedef typename Select<isStdArith || isPointer || isMemberPointer, T, 
02217                 typename Private::AddParameterType<T>::Result>::Result 
02218             ParameterType;
02219     };
02220 }
02221 
02222 #ifdef _MSC_VER
02223 #pragma warning( pop )
02224 #endif // _MSC_VER
02225 
02226 
02227 #endif // end file guardian
02228 

Generated on Sun Feb 25 16:52:29 2007 for Loki by  doxygen 1.5.1-p1