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