diff --git a/MSVC/1300/TypeTraits.h b/MSVC/1300/TypeTraits.h index eca7218..df91544 100644 --- a/MSVC/1300/TypeTraits.h +++ b/MSVC/1300/TypeTraits.h @@ -91,6 +91,40 @@ namespace Loki typedef TYPELIST_3(float, double, long double) StdFloats; } + namespace Private + { + + template + class IsArray + { + template struct Type2Type2 {}; + + typedef char (&yes)[1]; + typedef char (&no) [2]; + + template + static void vc7_need_this_for_is_array(Type2Type2); + + template + static yes is_array1(Type2Type2*); + static no is_array1(...); + + template + static yes is_array2(Type2Type2*); + static no is_array2(...); + + public: + enum { + value = + sizeof(is_array1((Type2Type2*)0)) == sizeof(yes) || + sizeof(is_array2((Type2Type2*)0)) == sizeof(yes) + }; + + }; + + + } // Private Namespace + //////////////////////////////////////////////////////////////////////////////// // class template TypeTraits // Figures out various properties of any given type @@ -150,9 +184,6 @@ namespace Loki typedef char (&yes)[1]; typedef char (&no) [2]; - template - static void vc7_need_this_for_is_array(Type2Type); - template static yes is_reference(Type2Type); static no is_reference(...); @@ -177,14 +208,6 @@ namespace Loki static yes is_pointer2member(Type2Type); static no is_pointer2member(...); - template - static yes is_array1(Type2Type); - static no is_array1(...); - - template - static yes is_array2(Type2Type); - static no is_array2(...); - template static yes is_const(Type2Type); static no is_const(...); @@ -219,9 +242,7 @@ namespace Loki }; enum { - isArray = - sizeof(is_array1(Type2Type())) == sizeof(yes) || - sizeof(is_array2(Type2Type())) == sizeof(yes) + isArray = Private::IsArray::value }; enum {