TypeTraits.h revision 263508
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/// \file
11/// \brief Defines enumerations for the type traits support.
12///
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_CLANG_TYPETRAITS_H
16#define LLVM_CLANG_TYPETRAITS_H
17
18namespace clang {
19
20  /// \brief Names for the unary type traits.
21  enum UnaryTypeTrait {
22    UTT_HasNothrowAssign,
23    UTT_HasNothrowMoveAssign,
24    UTT_HasNothrowCopy,
25    UTT_HasNothrowConstructor,
26    UTT_HasTrivialAssign,
27    UTT_HasTrivialMoveAssign,
28    UTT_HasTrivialCopy,
29    UTT_HasTrivialDefaultConstructor,
30    UTT_HasTrivialMoveConstructor,
31    UTT_HasTrivialDestructor,
32    UTT_HasVirtualDestructor,
33    UTT_IsAbstract,
34    UTT_IsArithmetic,
35    UTT_IsArray,
36    UTT_IsClass,
37    UTT_IsCompleteType,
38    UTT_IsCompound,
39    UTT_IsConst,
40    UTT_IsEmpty,
41    UTT_IsEnum,
42    UTT_IsFinal,
43    UTT_IsFloatingPoint,
44    UTT_IsFunction,
45    UTT_IsFundamental,
46    UTT_IsIntegral,
47    UTT_IsInterfaceClass,
48    UTT_IsLiteral,
49    UTT_IsLvalueReference,
50    UTT_IsMemberFunctionPointer,
51    UTT_IsMemberObjectPointer,
52    UTT_IsMemberPointer,
53    UTT_IsObject,
54    UTT_IsPOD,
55    UTT_IsPointer,
56    UTT_IsPolymorphic,
57    UTT_IsReference,
58    UTT_IsRvalueReference,
59    UTT_IsScalar,
60    UTT_IsSealed,
61    UTT_IsSigned,
62    UTT_IsStandardLayout,
63    UTT_IsTrivial,
64    UTT_IsTriviallyCopyable,
65    UTT_IsUnion,
66    UTT_IsUnsigned,
67    UTT_IsVoid,
68    UTT_IsVolatile
69  };
70
71  /// \brief Names for the binary type traits.
72  enum BinaryTypeTrait {
73    BTT_IsBaseOf,
74    BTT_IsConvertible,
75    BTT_IsConvertibleTo,
76    BTT_IsSame,
77    BTT_TypeCompatible,
78    BTT_IsTriviallyAssignable
79  };
80
81  /// \brief Names for the array type traits.
82  enum ArrayTypeTrait {
83    ATT_ArrayRank,
84    ATT_ArrayExtent
85  };
86
87  /// \brief Names for the "expression or type" traits.
88  enum UnaryExprOrTypeTrait {
89    UETT_SizeOf,
90    UETT_AlignOf,
91    UETT_VecStep
92  };
93
94  /// \brief Names for type traits that operate specifically on types.
95  enum TypeTrait {
96    TT_IsTriviallyConstructible
97  };
98
99}
100
101#endif
102