diff --git a/include/loki/TypeTraits.h b/include/loki/TypeTraits.h index d8f24d2..1482acf 100644 --- a/include/loki/TypeTraits.h +++ b/include/loki/TypeTraits.h @@ -98,17 +98,17 @@ namespace Loki typedef NullType Result; }; - template struct AddConstReference + template struct AddParameterType { typedef const U & Result; }; - template struct AddConstReference + template struct AddParameterType { - typedef const U & Result; + typedef U & Result; }; - template <> struct AddConstReference + template <> struct AddParameterType { typedef NullType Result; }; @@ -2044,7 +2044,7 @@ namespace Loki enum { result = true }; typedef U ReferredType; }; - + template struct PointerTraits { enum { result = false }; @@ -2176,13 +2176,8 @@ namespace Loki enum { isFundamental = isStdFundamental || isArith || isFloat }; typedef typename Select::Result>::Result + typename Private::AddParameterType::Result>::Result ParameterType; - - typedef typename Select::Result>::Result - ConstParameterType; - }; } diff --git a/tools/RegressionTest/TypeTraitsTest.h b/tools/RegressionTest/TypeTraitsTest.h index 78e463f..6c17fe6 100644 --- a/tools/RegressionTest/TypeTraitsTest.h +++ b/tools/RegressionTest/TypeTraitsTest.h @@ -104,8 +104,8 @@ public: SameType::ParameterType,char>::value && SameType::ParameterType,int>::value && SameType::ParameterType,double>::value && - SameType::ParameterType,Test &>::value && - SameType::ConstParameterType,const Test &>::value; + SameType::ParameterType,Test &>::value && + SameType::ParameterType,const Test &>::value; testAssert("TypeTraits",r,result); diff --git a/tools/RegressionTest/TypeTraitsTest2.h b/tools/RegressionTest/TypeTraitsTest2.h index 8648ab2..527b410 100755 --- a/tools/RegressionTest/TypeTraitsTest2.h +++ b/tools/RegressionTest/TypeTraitsTest2.h @@ -507,8 +507,7 @@ inline void TypeTraitsTest2::testParameterType() TEST_TYPE(const volatile A, const volatile A&); TEST_TYPE(A&, A&); - //TEST_TYPE(A, const A&); use ConstParameterType - + TEST_TYPE(A, const A&); } inline void TypeTraitsTest2::testReferredType()