From fb0c7571c1c2bcb6d9e10c35726d6c21a1db39f4 Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 3 May 2015 23:50:09 +0100 Subject: [PATCH] more style/consistency stuff --- octa/memory.h | 50 +++---- octa/type_traits.h | 328 ++++++++++++++++++++++----------------------- 2 files changed, 189 insertions(+), 189 deletions(-) diff --git a/octa/memory.h b/octa/memory.h index 3a61cdb..b305263 100644 --- a/octa/memory.h +++ b/octa/memory.h @@ -33,17 +33,17 @@ namespace octa { struct __OctaPtrTraitsElementType; template struct __OctaPtrTraitsElementType { - typedef typename T::ElementType type; + typedef typename T::ElementType Type; }; template class T, typename U, typename ...A> struct __OctaPtrTraitsElementType, true> { - typedef typename T::ElementType type; + typedef typename T::ElementType Type; }; template class T, typename U, typename ...A> struct __OctaPtrTraitsElementType, false> { - typedef U type; + typedef U Type; }; template @@ -51,18 +51,18 @@ namespace octa { template static int __octa_test(...); template - static char __octa_test(typename U::difference_type * = 0); + static char __octa_test(typename U::DiffType * = 0); static constexpr bool value = (sizeof(__octa_test(0)) == 1); }; template::value> struct __OctaPtrTraitsDiffType { - typedef ptrdiff_t type; + typedef ptrdiff_t Type; }; template struct __OctaPtrTraitsDiffType { - typedef typename T::difference_type type; + typedef typename T::DiffType Type; }; template @@ -77,66 +77,66 @@ namespace octa { template::value> struct __OctaPtrTraitsRebindType { - typedef typename T::template rebind type; + typedef typename T::template rebind Type; }; template class T, typename U, typename ...A, typename V > struct __OctaPtrTraitsRebindType, V, true> { - typedef typename T::template rebind type; + typedef typename T::template rebind Type; }; template class T, typename U, typename ...A, typename V > struct __OctaPtrTraitsRebindType, V, false> { - typedef T type; + typedef T Type; }; template struct __OctaPtrTraitsPointer { - typedef T type; + typedef T Type; }; template struct __OctaPtrTraitsPointer { - typedef T *type; + typedef T *Type; }; template - using PtrType = typename __OctaPtrTraitsPointer::type; + using PtrType = typename __OctaPtrTraitsPointer::Type; template struct __OctaPtrTraitsElement { - typedef typename __OctaPtrTraitsElementType::type type; + typedef typename __OctaPtrTraitsElementType::Type Type; }; template struct __OctaPtrTraitsElement { - typedef T type; + typedef T Type; }; template - using PointerElement = typename __OctaPtrTraitsElement::type; + using PointerElement = typename __OctaPtrTraitsElement::Type; template struct __OctaPtrTraitsDifference { - typedef typename __OctaPtrTraitsDiffType::type type; + typedef typename __OctaPtrTraitsDiffType::Type Type; }; template struct __OctaPtrTraitsDifference { - typedef ptrdiff_t difference_type; + typedef ptrdiff_t DiffType; }; template - using PointerDifference = typename __OctaPtrTraitsDifference::type; + using PointerDifference = typename __OctaPtrTraitsDifference::Type; template struct __OctaPtrTraitsRebind { - using type = typename __OctaPtrTraitsRebindType::type; + using type = typename __OctaPtrTraitsRebindType::Type; }; template @@ -145,7 +145,7 @@ namespace octa { }; template - using PointerRebind = typename __OctaPtrTraitsRebind::type; + using PointerRebind = typename __OctaPtrTraitsRebind::Type; struct __OctaPtrTraitsNat {}; @@ -250,22 +250,22 @@ namespace octa { template::value> struct __OctaPtrTypeBase { - typedef typename D::PtrType type; + typedef typename D::PtrType Type; }; template struct __OctaPtrTypeBase { - typedef T *type; + typedef T *Type; }; template struct __OctaPtrType { - typedef typename __OctaPtrTypeBase>::type type; + typedef typename __OctaPtrTypeBase>::Type Type; }; template> struct Box { typedef T ElementType; typedef D DeleterType; - typedef typename __OctaPtrType::type PtrType; + typedef typename __OctaPtrType::Type PtrType; private: struct __OctaNat { int x; }; @@ -382,7 +382,7 @@ namespace octa { struct Box { typedef T ElementType; typedef D DeleterType; - typedef typename __OctaPtrType::type PtrType; + typedef typename __OctaPtrType::Type PtrType; private: struct __OctaNat { int x; }; diff --git a/octa/type_traits.h b/octa/type_traits.h index d3cf47b..69dbb09 100644 --- a/octa/type_traits.h +++ b/octa/type_traits.h @@ -25,7 +25,7 @@ namespace octa { template struct __OctaCommonType; /* declval also defined here to avoid including utility.h */ - template typename __OctaAddRr::type __octa_declval(); + template typename __OctaAddRr::Type __octa_declval(); /* integral constant */ @@ -33,11 +33,11 @@ namespace octa { struct IntegralConstant { static constexpr T value = val; - typedef T value_type; - typedef IntegralConstant type; + typedef T ValType; + typedef IntegralConstant Type; - constexpr operator value_type() const { return value; } - constexpr value_type operator()() const { return value; } + constexpr operator ValType() const { return value; } + constexpr ValType operator()() const { return value; } }; typedef IntegralConstant True; @@ -51,7 +51,7 @@ namespace octa { template< > struct __OctaIsVoid: True {}; template - struct IsVoid: __OctaIsVoid::type> {}; + struct IsVoid: __OctaIsVoid::Type> {}; /* is null pointer */ @@ -59,7 +59,7 @@ namespace octa { template< > struct __OctaIsNullPointer: True {}; template struct IsNullPointer: __OctaIsNullPointer< - typename __OctaRemoveCv::type + typename __OctaRemoveCv::Type > {}; /* is integer */ @@ -80,7 +80,7 @@ namespace octa { template<> struct __OctaIsIntegral: True {}; template - struct IsIntegral: __OctaIsIntegral::type> {}; + struct IsIntegral: __OctaIsIntegral::Type> {}; /* is floating point */ @@ -91,7 +91,7 @@ namespace octa { template<> struct __OctaIsFloatingPoint: True {}; template - struct IsFloatingPoint: __OctaIsFloatingPoint::type> {}; + struct IsFloatingPoint: __OctaIsFloatingPoint::Type> {}; /* is array */ @@ -105,7 +105,7 @@ namespace octa { template struct __OctaIsPointer: True {}; template - struct IsPointer: __OctaIsPointer::type> {}; + struct IsPointer: __OctaIsPointer::Type> {}; /* is lvalue reference */ @@ -179,7 +179,7 @@ namespace octa { template struct IsMemberPointer: __OctaIsMemberPointer< - typename __OctaRemoveCv::type + typename __OctaRemoveCv::Type > {}; /* is pointer to member object */ @@ -193,7 +193,7 @@ namespace octa { > {}; template struct IsMemberObjectPointer: - __OctaIsMemberObjectPointer::type> {}; + __OctaIsMemberObjectPointer::Type> {}; /* is pointer to member function */ @@ -206,7 +206,7 @@ namespace octa { > {}; template struct IsMemberFunctionPointer: - __OctaIsMemberFunctionPointer::type> {}; + __OctaIsMemberFunctionPointer::Type> {}; /* is reference */ @@ -270,14 +270,14 @@ namespace octa { template struct IsStandardLayout: IntegralConstant::type>::value + IsScalar::Type>::value > {}; /* is literal type */ template struct IsLiteralType: IntegralConstant::type>::value + IsReference::Type>::value || IsStandardLayout::value > {}; @@ -285,7 +285,7 @@ namespace octa { template struct IsTriviallyCopyable: IntegralConstant::type>::value + IsScalar::Type>::value > {}; /* is trivial */ @@ -304,14 +304,14 @@ namespace octa { /* is constructible */ -#define __OCTA_MOVE(v) static_cast::type &&>(v) +#define __OCTA_MOVE(v) static_cast::Type &&>(v) - template struct __OctaSelect2nd { typedef T type; }; + template struct __OctaSelect2nd { typedef T Type; }; struct __OctaAny { __OctaAny(...); }; template typename __OctaSelect2nd< decltype(__OCTA_MOVE(T(__octa_declval()...))), True - >::type __octa_is_ctible_test(T &&, A &&...); + >::Type __octa_is_ctible_test(T &&, A &&...); #undef __OCTA_MOVE @@ -321,7 +321,7 @@ namespace octa { struct __OctaCtibleCore: __OctaCommonType< decltype(__octa_is_ctible_test(__octa_declval(), __octa_declval()...)) - >::type {}; + >::Type {}; /* function types are not constructible */ template @@ -342,7 +342,7 @@ namespace octa { template struct __OctaCtibleCore: __OctaCommonType< decltype(__OctaCtibleRef::test(__octa_declval())) - >::type {}; + >::Type {}; /* scalars and references are not constructible from multiple args */ template @@ -378,7 +378,7 @@ namespace octa { /* array types are default constructible if their element type is */ template struct __OctaCtibleCore: __OctaCtible< - typename __OctaRemoveAllExtents::type + typename __OctaRemoveAllExtents::Type > {}; /* otherwise array types are not constructible by this syntax */ @@ -399,27 +399,27 @@ namespace octa { /* is copy constructible */ template struct IsCopyConstructible: IsConstructible::type>::type + typename __OctaAddLr::Type>::Type > {}; /* is move constructible */ template struct IsMoveConstructible: IsConstructible::type + typename __OctaAddRr::Type > {}; /* is assignable */ template typename __OctaSelect2nd< decltype((__octa_declval() = __octa_declval())), True - >::type __octa_assign_test(T &&, U &&); + >::Type __octa_assign_test(T &&, U &&); template False __octa_assign_test(__OctaAny, T &&); template::value || IsVoid::value> struct __OctaIsAssignable: __OctaCommonType< decltype(__octa_assign_test(__octa_declval(), __octa_declval())) - >::type {}; + >::Type {}; template struct __OctaIsAssignable: False {}; @@ -430,25 +430,25 @@ namespace octa { /* is copy assignable */ template struct IsCopyAssignable: IsAssignable< - typename __OctaAddLr::type, - typename __OctaAddLr::type>::type + typename __OctaAddLr::Type, + typename __OctaAddLr::Type>::Type > {}; /* is move assignable */ template struct IsMoveAssignable: IsAssignable< - typename __OctaAddLr::type, - const typename __OctaAddRr::type + typename __OctaAddLr::Type, + const typename __OctaAddRr::Type > {}; /* is destructible */ - template struct __OctaIsDtibleApply { typedef int type; }; + template struct __OctaIsDtibleApply { typedef int Type; }; template struct IsDestructorWellformed { template static char test(typename __OctaIsDtibleApply< decltype(__octa_declval().~TT()) - >::type); + >::Type); template static int test(...); @@ -459,7 +459,7 @@ namespace octa { template struct __OctaDtibleImpl: IntegralConstant::type>::value + IsDestructorWellformed::Type>::value > {}; template @@ -512,14 +512,14 @@ namespace octa { template struct IsTriviallyCopyConstructible: IsTriviallyConstructible::type + typename __OctaAddLr::Type > {}; /* is trivially move constructible */ template struct IsTriviallyMoveConstructible: IsTriviallyConstructible::type + typename __OctaAddRr::Type > {}; /* is trivially assignable */ @@ -551,14 +551,14 @@ namespace octa { template struct IsTriviallyCopyAssignable: IsTriviallyAssignable::type + typename __OctaAddLr::Type > {}; /* is trivially move assignable */ template struct IsTriviallyMoveAssignable: IsTriviallyAssignable::type + typename __OctaAddRr::Type > {}; /* is trivially destructible */ @@ -602,14 +602,14 @@ namespace octa { template struct IsNothrowCopyConstructible: IsNothrowConstructible::type + typename __OctaAddLr::Type > {}; /* is nothrow move constructible */ template struct IsNothrowMoveConstructible: IsNothrowConstructible::type + typename __OctaAddRr::Type > {}; /* is nothrow assignable */ @@ -641,14 +641,14 @@ namespace octa { template struct IsNothrowCopyAssignable: IsNothrowAssignable::type + typename __OctaAddLr::Type > {}; /* is nothrow move assignable */ template struct IsNothrowMoveAssignable: IsNothrowAssignable::type + typename __OctaAddRr::Type > {}; /* is nothrow destructible */ @@ -687,7 +687,7 @@ namespace octa { template::value || IsFunction::value || IsArray::value > struct __OctaIsConvertible { - typedef typename IsVoid::type type; + typedef typename IsVoid::Type Type; }; template struct __OctaIsConvertible { @@ -699,11 +699,11 @@ namespace octa { template static False test(...); - typedef decltype(test(0)) type; + typedef decltype(test(0)) Type; }; template - struct IsConvertible: __OctaIsConvertible::type {}; + struct IsConvertible: __OctaIsConvertible::Type {}; /* type equality */ @@ -740,174 +740,174 @@ namespace octa { /* remove const, volatile, cv */ template - struct __OctaRemoveConst { typedef T type; }; + struct __OctaRemoveConst { typedef T Type; }; template - struct __OctaRemoveConst { typedef T type; }; + struct __OctaRemoveConst { typedef T Type; }; template - struct __OctaRemoveVolatile { typedef T type; }; + struct __OctaRemoveVolatile { typedef T Type; }; template - struct __OctaRemoveVolatile { typedef T type; }; + struct __OctaRemoveVolatile { typedef T Type; }; template struct __OctaRemoveCv { typedef typename __OctaRemoveVolatile< - typename __OctaRemoveConst::type - >::type type; + typename __OctaRemoveConst::Type + >::Type Type; }; template - using RemoveConst = typename __OctaRemoveConst::type; + using RemoveConst = typename __OctaRemoveConst::Type; template - using RemoveVolatile = typename __OctaRemoveVolatile::type; + using RemoveVolatile = typename __OctaRemoveVolatile::Type; template - using RemoveCv = typename __OctaRemoveCv::type; + using RemoveCv = typename __OctaRemoveCv::Type; /* add const, volatile, cv */ template::value || IsFunction::value || IsConst::value> - struct __Octa__OctaAddConst { typedef T type; }; + struct __Octa__OctaAddConst { typedef T Type; }; template struct __Octa__OctaAddConst { - typedef const T type; + typedef const T Type; }; template struct __OctaAddConst { - typedef typename __Octa__OctaAddConst::type type; + typedef typename __Octa__OctaAddConst::Type Type; }; template::value || IsFunction::value || IsVolatile::value> - struct __Octa__OctaAddVolatile { typedef T type; }; + struct __Octa__OctaAddVolatile { typedef T Type; }; template struct __Octa__OctaAddVolatile { - typedef volatile T type; + typedef volatile T Type; }; template struct __OctaAddVolatile { - typedef typename __Octa__OctaAddVolatile::type type; + typedef typename __Octa__OctaAddVolatile::Type Type; }; template struct __OctaAddCv { typedef typename __OctaAddConst< - typename __OctaAddVolatile::type - >::type type; + typename __OctaAddVolatile::Type + >::Type Type; }; template - using AddConst = typename __OctaAddConst::type; + using AddConst = typename __OctaAddConst::Type; template - using AddVolatile = typename __OctaAddVolatile::type; + using AddVolatile = typename __OctaAddVolatile::Type; template - using AddCv = typename __OctaAddCv::type; + using AddCv = typename __OctaAddCv::Type; /* remove reference */ template - struct __OctaRemoveReference { typedef T type; }; + struct __OctaRemoveReference { typedef T Type; }; template - struct __OctaRemoveReference { typedef T type; }; + struct __OctaRemoveReference { typedef T Type; }; template - struct __OctaRemoveReference { typedef T type; }; + struct __OctaRemoveReference { typedef T Type; }; template - using RemoveReference = typename __OctaRemoveReference::type; + using RemoveReference = typename __OctaRemoveReference::Type; /* remove pointer */ template - struct __OctaRemovePointer { typedef T type; }; + struct __OctaRemovePointer { typedef T Type; }; template - struct __OctaRemovePointer { typedef T type; }; + struct __OctaRemovePointer { typedef T Type; }; template - struct __OctaRemovePointer { typedef T type; }; + struct __OctaRemovePointer { typedef T Type; }; template - struct __OctaRemovePointer { typedef T type; }; + struct __OctaRemovePointer { typedef T Type; }; template - struct __OctaRemovePointer { typedef T type; }; + struct __OctaRemovePointer { typedef T Type; }; template - using RemovePointer = typename __OctaRemovePointer::type; + using RemovePointer = typename __OctaRemovePointer::Type; /* add pointer */ template struct __OctaAddPointer { - typedef typename __OctaRemoveReference::type *type; + typedef typename __OctaRemoveReference::Type *Type; }; template - using AddPointer = typename __OctaAddPointer::type; + using AddPointer = typename __OctaAddPointer::Type; /* add lvalue reference */ - template struct __OctaAddLr { typedef T &type; }; - template struct __OctaAddLr { typedef T &type; }; - template struct __OctaAddLr { typedef T &type; }; + template struct __OctaAddLr { typedef T &Type; }; + template struct __OctaAddLr { typedef T &Type; }; + template struct __OctaAddLr { typedef T &Type; }; template<> struct __OctaAddLr { - typedef void type; + typedef void Type; }; template<> struct __OctaAddLr { - typedef const void type; + typedef const void Type; }; template<> struct __OctaAddLr { - typedef volatile void type; + typedef volatile void Type; }; template<> struct __OctaAddLr { - typedef const volatile void type; + typedef const volatile void Type; }; template - using AddLvalueReference = typename __OctaAddLr::type; + using AddLvalueReference = typename __OctaAddLr::Type; /* add rvalue reference */ - template struct __OctaAddRr { typedef T &&type; }; - template struct __OctaAddRr { typedef T &&type; }; - template struct __OctaAddRr { typedef T &&type; }; + template struct __OctaAddRr { typedef T &&Type; }; + template struct __OctaAddRr { typedef T &&Type; }; + template struct __OctaAddRr { typedef T &&Type; }; template<> struct __OctaAddRr { - typedef void type; + typedef void Type; }; template<> struct __OctaAddRr { - typedef const void type; + typedef const void Type; }; template<> struct __OctaAddRr { - typedef volatile void type; + typedef volatile void Type; }; template<> struct __OctaAddRr { - typedef const volatile void type; + typedef const volatile void Type; }; template - using AddRvalueReference = typename __OctaAddRr::type; + using AddRvalueReference = typename __OctaAddRr::Type; /* remove extent */ template - struct __OctaRemoveExtent { typedef T type; }; + struct __OctaRemoveExtent { typedef T Type; }; template - struct __OctaRemoveExtent { typedef T type; }; + struct __OctaRemoveExtent { typedef T Type; }; template - struct __OctaRemoveExtent { typedef T type; }; + struct __OctaRemoveExtent { typedef T Type; }; template - using RemoveExtent = typename __OctaRemoveExtent::type; + using RemoveExtent = typename __OctaRemoveExtent::Type; /* remove all extents */ - template struct __OctaRemoveAllExtents { typedef T type; }; + template struct __OctaRemoveAllExtents { typedef T Type; }; template struct __OctaRemoveAllExtents { - typedef typename __OctaRemoveAllExtents::type type; + typedef typename __OctaRemoveAllExtents::Type Type; }; template struct __OctaRemoveAllExtents { - typedef typename __OctaRemoveAllExtents::type type; + typedef typename __OctaRemoveAllExtents::Type Type; }; template - using RemoveAllExtents = typename __OctaRemoveAllExtents::type; + using RemoveAllExtents = typename __OctaRemoveAllExtents::Type; /* make (un)signed * @@ -945,49 +945,49 @@ namespace octa { template struct __OctaTypeFindFirst<__OctaTl, N, true> { - typedef T type; + typedef T Type; }; template struct __OctaTypeFindFirst<__OctaTl, N, false> { - typedef typename __OctaTypeFindFirst::type type; + typedef typename __OctaTypeFindFirst::Type Type; }; template::type>::value, - bool = IsVolatile::type>::value + bool = IsConst::Type>::value, + bool = IsVolatile::Type>::value > struct __OctaApplyCv { - typedef U type; + typedef U Type; }; template struct __OctaApplyCv { /* const */ - typedef const U type; + typedef const U Type; }; template struct __OctaApplyCv { /* volatile */ - typedef volatile U type; + typedef volatile U Type; }; template struct __OctaApplyCv { /* const volatile */ - typedef const volatile U type; + typedef const volatile U Type; }; template struct __OctaApplyCv { /* const */ - typedef const U &type; + typedef const U &Type; }; template struct __OctaApplyCv { /* volatile */ - typedef volatile U &type; + typedef volatile U &Type; }; template struct __OctaApplyCv { /* const volatile */ - typedef const volatile U &type; + typedef const volatile U &Type; }; template::value || IsEnum::value> @@ -998,73 +998,73 @@ namespace octa { template struct __OctaMakeSigned { - typedef typename __OctaTypeFindFirst::type type; + typedef typename __OctaTypeFindFirst::Type Type; }; template struct __OctaMakeUnsigned { - typedef typename __OctaTypeFindFirst::type type; + typedef typename __OctaTypeFindFirst::Type Type; }; template<> struct __OctaMakeSigned {}; - template<> struct __OctaMakeSigned { typedef schar type; }; - template<> struct __OctaMakeSigned { typedef schar type; }; - template<> struct __OctaMakeSigned { typedef short type; }; - template<> struct __OctaMakeSigned { typedef short type; }; - template<> struct __OctaMakeSigned { typedef int type; }; - template<> struct __OctaMakeSigned { typedef int type; }; - template<> struct __OctaMakeSigned { typedef long type; }; - template<> struct __OctaMakeSigned { typedef long type; }; - template<> struct __OctaMakeSigned { typedef llong type; }; - template<> struct __OctaMakeSigned { typedef llong type; }; + template<> struct __OctaMakeSigned { typedef schar Type; }; + template<> struct __OctaMakeSigned { typedef schar Type; }; + template<> struct __OctaMakeSigned { typedef short Type; }; + template<> struct __OctaMakeSigned { typedef short Type; }; + template<> struct __OctaMakeSigned { typedef int Type; }; + template<> struct __OctaMakeSigned { typedef int Type; }; + template<> struct __OctaMakeSigned { typedef long Type; }; + template<> struct __OctaMakeSigned { typedef long Type; }; + template<> struct __OctaMakeSigned { typedef llong Type; }; + template<> struct __OctaMakeSigned { typedef llong Type; }; template<> struct __OctaMakeUnsigned {}; - template<> struct __OctaMakeUnsigned { typedef uchar type; }; - template<> struct __OctaMakeUnsigned { typedef uchar type; }; - template<> struct __OctaMakeUnsigned { typedef ushort type; }; - template<> struct __OctaMakeUnsigned { typedef ushort type; }; - template<> struct __OctaMakeUnsigned { typedef uint type; }; - template<> struct __OctaMakeUnsigned { typedef uint type; }; - template<> struct __OctaMakeUnsigned { typedef ulong type; }; - template<> struct __OctaMakeUnsigned { typedef ulong type; }; - template<> struct __OctaMakeUnsigned { typedef ullong type; }; - template<> struct __OctaMakeUnsigned { typedef ullong type; }; + template<> struct __OctaMakeUnsigned { typedef uchar Type; }; + template<> struct __OctaMakeUnsigned { typedef uchar Type; }; + template<> struct __OctaMakeUnsigned { typedef ushort Type; }; + template<> struct __OctaMakeUnsigned { typedef ushort Type; }; + template<> struct __OctaMakeUnsigned { typedef uint Type; }; + template<> struct __OctaMakeUnsigned { typedef uint Type; }; + template<> struct __OctaMakeUnsigned { typedef ulong Type; }; + template<> struct __OctaMakeUnsigned { typedef ulong Type; }; + template<> struct __OctaMakeUnsigned { typedef ullong Type; }; + template<> struct __OctaMakeUnsigned { typedef ullong Type; }; template struct __OctaMakeSignedBase { typedef typename __OctaApplyCv::type - >::type - >::type type; + typename __OctaRemoveCv::Type + >::Type + >::Type Type; }; template struct __OctaMakeUnsignedBase { typedef typename __OctaApplyCv::type - >::type - >::type type; + typename __OctaRemoveCv::Type + >::Type + >::Type Type; }; template - using MakeSigned = typename __OctaMakeSignedBase::type; + using MakeSigned = typename __OctaMakeSignedBase::Type; template - using MakeUnsigned = typename __OctaMakeUnsignedBase::type; + using MakeUnsigned = typename __OctaMakeUnsignedBase::Type; /* conditional */ template struct __OctaConditional { - typedef T type; + typedef T Type; }; template struct __OctaConditional { - typedef U type; + typedef U Type; }; template - using Conditional = typename __OctaConditional::type; + using Conditional = typename __OctaConditional::Type; /* result of call at compile time */ @@ -1108,57 +1108,57 @@ namespace octa { template struct __OctaResultOfBase: __OctaResultOf {}; template - using ResultOf = typename __OctaResultOfBase::type; + using ResultOf = typename __OctaResultOfBase::Type; /* enable if */ template struct __OctaEnableIf {}; - template struct __OctaEnableIf { typedef T type; }; + template struct __OctaEnableIf { typedef T Type; }; template - using EnableIf = typename __OctaEnableIf::type; + using EnableIf = typename __OctaEnableIf::Type; /* decay */ template struct __OctaDecay { private: - typedef typename __OctaRemoveReference::type U; + typedef typename __OctaRemoveReference::Type U; public: typedef typename __OctaConditional::value, - typename __OctaRemoveExtent::type *, + typename __OctaRemoveExtent::Type *, typename __OctaConditional::value, - typename __OctaAddPointer::type, - typename __OctaRemoveCv::type - >::type - >::type type; + typename __OctaAddPointer::Type, + typename __OctaRemoveCv::Type + >::Type + >::Type Type; }; template - using Decay = typename __OctaDecay::type; + using Decay = typename __OctaDecay::Type; /* common type */ template struct __OctaCommonType; template struct __OctaCommonType { - typedef __OctaDecay type; + typedef __OctaDecay Type; }; template struct __OctaCommonType { typedef __OctaDecay() - : __octa_declval())> type; + : __octa_declval())> Type; }; template struct __OctaCommonType { - typedef typename __OctaCommonType::type, - V...>::type type; + typedef typename __OctaCommonType::Type, + V...>::Type Type; }; template - using CommonType = typename __OctaCommonType::type; + using CommonType = typename __OctaCommonType::Type; /* aligned storage */ @@ -1176,8 +1176,8 @@ namespace octa { }; template::type) - > using AlignedStorage = typename __OctaAlignedStorage::type; + = alignof(typename __OctaAlignedTest::Type) + > using AlignedStorage = typename __OctaAlignedStorage::Type; /* aligned union */ @@ -1208,7 +1208,7 @@ namespace octa { }; template - using AlignedUnion = typename __OctaAlignedUnion::type; + using AlignedUnion = typename __OctaAlignedUnion::Type; /* underlying type */ @@ -1217,11 +1217,11 @@ namespace octa { template struct __OctaUnderlyingType { typedef typename __OctaConditional::value, MakeSigned, MakeUnsigned - >::type type; + >::Type Type; }; template - using UnderlyingType = typename __OctaUnderlyingType::type; + using UnderlyingType = typename __OctaUnderlyingType::Type; } #endif \ No newline at end of file