• 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_BASIC_TYPETRAITS_H
16 #define LLVM_CLANG_BASIC_TYPETRAITS_H
17 
18 namespace clang {
19 
20   /// \brief Names for traits that operate specifically on types.
21   enum TypeTrait {
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_IsDestructible,
41     UTT_IsEmpty,
42     UTT_IsEnum,
43     UTT_IsFinal,
44     UTT_IsFloatingPoint,
45     UTT_IsFunction,
46     UTT_IsFundamental,
47     UTT_IsIntegral,
48     UTT_IsInterfaceClass,
49     UTT_IsLiteral,
50     UTT_IsLvalueReference,
51     UTT_IsMemberFunctionPointer,
52     UTT_IsMemberObjectPointer,
53     UTT_IsMemberPointer,
54     UTT_IsNothrowDestructible,
55     UTT_IsObject,
56     UTT_IsPOD,
57     UTT_IsPointer,
58     UTT_IsPolymorphic,
59     UTT_IsReference,
60     UTT_IsRvalueReference,
61     UTT_IsScalar,
62     UTT_IsSealed,
63     UTT_IsSigned,
64     UTT_IsStandardLayout,
65     UTT_IsTrivial,
66     UTT_IsTriviallyCopyable,
67     UTT_IsUnion,
68     UTT_IsUnsigned,
69     UTT_IsVoid,
70     UTT_IsVolatile,
71     UTT_Last = UTT_IsVolatile,
72     BTT_IsBaseOf,
73     BTT_IsConvertible,
74     BTT_IsConvertibleTo,
75     BTT_IsSame,
76     BTT_TypeCompatible,
77     BTT_IsAssignable,
78     BTT_IsNothrowAssignable,
79     BTT_IsTriviallyAssignable,
80     BTT_Last = BTT_IsTriviallyAssignable,
81     TT_IsConstructible,
82     TT_IsNothrowConstructible,
83     TT_IsTriviallyConstructible
84   };
85 
86   /// \brief Names for the array type traits.
87   enum ArrayTypeTrait {
88     ATT_ArrayRank,
89     ATT_ArrayExtent
90   };
91 
92   /// \brief Names for the "expression or type" traits.
93   enum UnaryExprOrTypeTrait {
94     UETT_SizeOf,
95     UETT_AlignOf,
96     UETT_VecStep,
97     UETT_OpenMPRequiredSimdAlign,
98   };
99 }
100 
101 #endif
102