1 //===--- TypeTraits.h - C++ Type Traits Support Enumerations ----*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 // 10 // This file defines enumerations for the type traits support. 11 // 12 //===----------------------------------------------------------------------===// 13 14 #ifndef LLVM_CLANG_TYPETRAITS_H 15 #define LLVM_CLANG_TYPETRAITS_H 16 17 namespace clang { 18 19 /// UnaryTypeTrait - Names for the unary type traits. 20 enum UnaryTypeTrait { 21 UTT_HasNothrowAssign, 22 UTT_HasNothrowCopy, 23 UTT_HasNothrowConstructor, 24 UTT_HasTrivialAssign, 25 UTT_HasTrivialCopy, 26 UTT_HasTrivialDefaultConstructor, 27 UTT_HasTrivialDestructor, 28 UTT_HasVirtualDestructor, 29 UTT_IsAbstract, 30 UTT_IsArithmetic, 31 UTT_IsArray, 32 UTT_IsClass, 33 UTT_IsCompleteType, 34 UTT_IsCompound, 35 UTT_IsConst, 36 UTT_IsEmpty, 37 UTT_IsEnum, 38 UTT_IsFloatingPoint, 39 UTT_IsFunction, 40 UTT_IsFundamental, 41 UTT_IsIntegral, 42 UTT_IsLiteral, 43 UTT_IsLvalueReference, 44 UTT_IsMemberFunctionPointer, 45 UTT_IsMemberObjectPointer, 46 UTT_IsMemberPointer, 47 UTT_IsObject, 48 UTT_IsPOD, 49 UTT_IsPointer, 50 UTT_IsPolymorphic, 51 UTT_IsReference, 52 UTT_IsRvalueReference, 53 UTT_IsScalar, 54 UTT_IsSigned, 55 UTT_IsStandardLayout, 56 UTT_IsTrivial, 57 UTT_IsTriviallyCopyable, 58 UTT_IsUnion, 59 UTT_IsUnsigned, 60 UTT_IsVoid, 61 UTT_IsVolatile 62 }; 63 64 /// BinaryTypeTrait - Names for the binary type traits. 65 enum BinaryTypeTrait { 66 BTT_IsBaseOf, 67 BTT_IsConvertible, 68 BTT_IsConvertibleTo, 69 BTT_IsSame, 70 BTT_TypeCompatible 71 }; 72 73 /// ArrayTypeTrait - Names for the array type traits. 74 enum ArrayTypeTrait { 75 ATT_ArrayRank, 76 ATT_ArrayExtent 77 }; 78 79 /// UnaryExprOrTypeTrait - Names for the "expression or type" traits. 80 enum UnaryExprOrTypeTrait { 81 UETT_SizeOf, 82 UETT_AlignOf, 83 UETT_VecStep 84 }; 85 } 86 87 #endif 88