1 //===--- TypeTraits.h - C++ Type Traits Support Enumerations ----*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
10 /// Defines enumerations for the type traits support.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_CLANG_BASIC_TYPETRAITS_H
15 #define LLVM_CLANG_BASIC_TYPETRAITS_H
19 /// Names for traits that operate specifically on types.
22 UTT_HasNothrowMoveAssign,
24 UTT_HasNothrowConstructor,
26 UTT_HasTrivialMoveAssign,
28 UTT_HasTrivialDefaultConstructor,
29 UTT_HasTrivialMoveConstructor,
30 UTT_HasTrivialDestructor,
31 UTT_HasVirtualDestructor,
50 UTT_IsLvalueReference,
51 UTT_IsMemberFunctionPointer,
52 UTT_IsMemberObjectPointer,
54 UTT_IsNothrowDestructible,
60 UTT_IsRvalueReference,
66 UTT_IsTriviallyCopyable,
67 UTT_IsTriviallyDestructible,
72 UTT_HasUniqueObjectRepresentations,
73 UTT_Last = UTT_HasUniqueObjectRepresentations,
80 BTT_IsNothrowAssignable,
81 BTT_IsTriviallyAssignable,
82 BTT_ReferenceBindsToTemporary,
83 BTT_Last = BTT_ReferenceBindsToTemporary,
85 TT_IsNothrowConstructible,
86 TT_IsTriviallyConstructible
89 /// Names for the array type traits.
95 /// Names for the "expression or type" traits.
96 enum UnaryExprOrTypeTrait {
98 /// Used for C's _Alignof and C++'s alignof.
99 /// _Alignof and alignof return the required ABI alignment.
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,