add isFunction, isFunctionPointer and isMemberFunction to TypeTrais.h, a HUGE patch from Kalle Runtanen

git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@239 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
syntheticpp 2005-09-15 21:14:37 +00:00
parent dc60af98c4
commit 4bf2e38475
2 changed files with 1936 additions and 30 deletions

File diff suppressed because it is too large Load diff

View file

@ -106,7 +106,7 @@
#include <string>
#include <typeinfo>
//#define ENABLE_ADDITIONAL_TYPETRAITS
#define ENABLE_ADDITIONAL_TYPETRAITS
#include <typetraits.h>
@ -383,13 +383,12 @@ inline void TypeTraitsTest2::testPointer()
PASS(void (* const volatile)(int, float));
PASS(void (* const volatile)(int, float, ...));
/*
// Pointer to member functions
PASS(void (A::* const volatile)() const volatile);
PASS(void (A::* const volatile)(int, float) const volatile);
PASS(void (A::* const volatile)(int, float, ...) const volatile);
PASS(int A::* const volatile);
*/
PASS(const volatile int** const volatile ** const * const volatile);
PASS(int* const volatile&);
@ -407,7 +406,7 @@ inline void TypeTraitsTest2::testMemberPointer()
PASS(int A::* const volatile);
PASS(const volatile int A::* const volatile);
/*
// Pointer to member functions
PASS(int (A::* )() const);
PASS(int (A::* const volatile)() const volatile);
@ -415,7 +414,7 @@ inline void TypeTraitsTest2::testMemberPointer()
PASS(int (A::* const volatile&)(int, float) const volatile);
PASS(int (A::* const volatile)(int, float, ...) const volatile);
PASS(int (A::* const volatile&)(int, float, ...) const volatile);
*/
FAIL(int);
FAIL(void);
@ -429,6 +428,7 @@ inline void TypeTraitsTest2::testFunctionPointer()
#undef CONDITION
#define CONDITION isFunctionPointer
PASS(void (*)());
FAIL(void (A::* const volatile)());
FAIL(void (A::* const volatile)() const);
FAIL(void (A::* const volatile)() volatile);
@ -446,6 +446,7 @@ inline void TypeTraitsTest2::testFunctionPointer()
FAIL(void);
FAIL(void*);
FAIL(int A::*);
#endif
}