clang 10.0.0git

TypeTraits.h
Go to the documentation of this file.
1 //===--- TypeTraits.h - C++ Type Traits Support Enumerations ----*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 ///
9 /// \file
10 /// Defines enumerations for the type traits support.
11 ///
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_CLANG_BASIC_TYPETRAITS_H
15 #define LLVM_CLANG_BASIC_TYPETRAITS_H
16
17 namespace clang {
18
19 /// Names for traits that operate specifically on types.
20 enum TypeTrait {
21 UTT_HasNothrowAssign,
22 UTT_HasNothrowMoveAssign,
23 UTT_HasNothrowCopy,
24 UTT_HasNothrowConstructor,
25 UTT_HasTrivialAssign,
26 UTT_HasTrivialMoveAssign,
27 UTT_HasTrivialCopy,
28 UTT_HasTrivialDefaultConstructor,
29 UTT_HasTrivialMoveConstructor,
30 UTT_HasTrivialDestructor,
31 UTT_HasVirtualDestructor,
32 UTT_IsAbstract,
33 UTT_IsAggregate,
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_IsTriviallyDestructible,
68 UTT_IsUnion,
69 UTT_IsUnsigned,
70 UTT_IsVoid,
71 UTT_IsVolatile,
72 UTT_HasUniqueObjectRepresentations,
73 UTT_Last = UTT_HasUniqueObjectRepresentations,
74 BTT_IsBaseOf,
75 BTT_IsConvertible,
76 BTT_IsConvertibleTo,
77 BTT_IsSame,
78 BTT_TypeCompatible,
79 BTT_IsAssignable,
80 BTT_IsNothrowAssignable,
81 BTT_IsTriviallyAssignable,
82 BTT_ReferenceBindsToTemporary,
83 BTT_Last = BTT_ReferenceBindsToTemporary,
84 TT_IsConstructible,
85 TT_IsNothrowConstructible,
86 TT_IsTriviallyConstructible
87 };
88
89 /// Names for the array type traits.
90 enum ArrayTypeTrait {
91 ATT_ArrayRank,
92 ATT_ArrayExtent
93 };
94
95 /// Names for the "expression or type" traits.
96 enum UnaryExprOrTypeTrait {
97 UETT_SizeOf,
98 /// Used for C's _Alignof and C++'s alignof.
99 /// _Alignof and alignof return the required ABI alignment.
100 UETT_AlignOf,
101 UETT_VecStep,
102 UETT_OpenMPRequiredSimdAlign,
103 /// Used for GCC's __alignof.
104 /// __alignof returns the preferred alignment of a type, the alignment
105 /// clang will attempt to give an object of the type if allowed by ABI.
106 UETT_PreferredAlignOf,
107 };
108 }
109
110 #endif
clang::UTT_IsEnum
Definition: TypeTraits.h:42
clang::UTT_IsMemberPointer
Definition: TypeTraits.h:53
clang::BTT_IsTriviallyAssignable
Definition: TypeTraits.h:81
clang::UTT_IsSigned
Definition: TypeTraits.h:63
clang::BTT_ReferenceBindsToTemporary
Definition: TypeTraits.h:82
clang::UTT_HasNothrowCopy
Definition: TypeTraits.h:23
clang::UTT_IsMemberObjectPointer
Definition: TypeTraits.h:52
clang::BTT_IsAssignable
Definition: TypeTraits.h:79
clang::TT_IsNothrowConstructible
Definition: TypeTraits.h:85
clang::UTT_IsNothrowDestructible
Definition: TypeTraits.h:54
clang::UTT_HasNothrowAssign
Definition: TypeTraits.h:21
clang::BTT_TypeCompatible
Definition: TypeTraits.h:78
clang::UTT_IsCompound
Definition: TypeTraits.h:38
clang::UTT_IsAggregate
Definition: TypeTraits.h:33
clang::UTT_IsTrivial
Definition: TypeTraits.h:65
clang::UTT_IsFundamental
Definition: TypeTraits.h:46
clang::UTT_IsVolatile
Definition: TypeTraits.h:71
clang::UETT_PreferredAlignOf
Used for GCC&#39;s __alignof.
Definition: TypeTraits.h:106
clang::UnaryExprOrTypeTrait
UnaryExprOrTypeTrait
Names for the "expression or type" traits.
Definition: TypeTraits.h:96
clang::BTT_IsNothrowAssignable
Definition: TypeTraits.h:80
clang::UTT_Last
Definition: TypeTraits.h:73
clang::UTT_IsCompleteType
Definition: TypeTraits.h:37
clang::UTT_IsFunction
Definition: TypeTraits.h:45
clang::ArrayTypeTrait
ArrayTypeTrait
Names for the array type traits.
Definition: TypeTraits.h:90
clang::UTT_HasTrivialDestructor
Definition: TypeTraits.h:30
clang::UTT_IsStandardLayout
Definition: TypeTraits.h:64
clang::TypeTrait
TypeTrait
Names for traits that operate specifically on types.
Definition: TypeTraits.h:20
clang::UTT_IsScalar
Definition: TypeTraits.h:61
clang::UTT_IsAbstract
Definition: TypeTraits.h:32
clang::UTT_HasUniqueObjectRepresentations
Definition: TypeTraits.h:72
clang::UTT_IsLiteral
Definition: TypeTraits.h:49
clang::UTT_IsArithmetic
Definition: TypeTraits.h:34
clang::UTT_IsLvalueReference
Definition: TypeTraits.h:50
clang::UTT_IsIntegral
Definition: TypeTraits.h:47
clang::UTT_IsVoid
Definition: TypeTraits.h:70
clang::UTT_IsReference
Definition: TypeTraits.h:59
clang::UTT_HasTrivialAssign
Definition: TypeTraits.h:25
clang::UTT_IsRvalueReference
Definition: TypeTraits.h:60
clang::UTT_HasTrivialMoveAssign
Definition: TypeTraits.h:26
clang::UTT_IsObject
Definition: TypeTraits.h:55
clang::UTT_HasNothrowMoveAssign
Definition: TypeTraits.h:22
clang::BTT_Last
Definition: TypeTraits.h:83
clang::BTT_IsConvertibleTo
Definition: TypeTraits.h:76
clang::UTT_IsPOD
Definition: TypeTraits.h:56
clang::UTT_HasTrivialDefaultConstructor
Definition: TypeTraits.h:28
clang::ATT_ArrayRank
Definition: TypeTraits.h:91
clang::UTT_IsFinal
Definition: TypeTraits.h:43
clang::UETT_AlignOf
Used for C&#39;s _Alignof and C++&#39;s alignof.
Definition: TypeTraits.h:100
clang::UTT_IsUnsigned
Definition: TypeTraits.h:69
clang::UTT_IsEmpty
Definition: TypeTraits.h:41
clang::UTT_HasNothrowConstructor
Definition: TypeTraits.h:24
clang::UTT_IsPointer
Definition: TypeTraits.h:57
clang::ATT_ArrayExtent
Definition: TypeTraits.h:92
clang::UTT_IsConst
Definition: TypeTraits.h:39
clang
Dataflow Directional Tag Classes.
Definition: CFGReachabilityAnalysis.h:21
clang::UTT_IsMemberFunctionPointer
Definition: TypeTraits.h:51
clang::BTT_IsConvertible
Definition: TypeTraits.h:75
clang::UTT_HasTrivialMoveConstructor
Definition: TypeTraits.h:29
clang::UTT_IsDestructible
Definition: TypeTraits.h:40
clang::UTT_IsTriviallyCopyable
Definition: TypeTraits.h:66
clang::UTT_IsArray
Definition: TypeTraits.h:35
clang::UTT_IsClass
Definition: TypeTraits.h:36
clang::UTT_IsInterfaceClass
Definition: TypeTraits.h:48
clang::BTT_IsSame
Definition: TypeTraits.h:77
clang::UTT_HasVirtualDestructor
Definition: TypeTraits.h:31
clang::UTT_IsUnion
Definition: TypeTraits.h:68
clang::UTT_IsFloatingPoint
Definition: TypeTraits.h:44
clang::BTT_IsBaseOf
Definition: TypeTraits.h:74
clang::UETT_SizeOf
Definition: TypeTraits.h:97
clang::TT_IsTriviallyConstructible
Definition: TypeTraits.h:86
clang::UTT_IsTriviallyDestructible
Definition: TypeTraits.h:67
clang::UETT_VecStep
Definition: TypeTraits.h:101
clang::UTT_HasTrivialCopy
Definition: TypeTraits.h:27
clang::UTT_IsPolymorphic
Definition: TypeTraits.h:58
clang::TT_IsConstructible
Definition: TypeTraits.h:84
clang::UETT_OpenMPRequiredSimdAlign
Definition: TypeTraits.h:102
clang::UTT_IsSealed
Definition: TypeTraits.h:62