Home | History | Annotate | Download | only in Basic
      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_IsLiteral,
     45     UTT_IsLvalueReference,
     46     UTT_IsMemberFunctionPointer,
     47     UTT_IsMemberObjectPointer,
     48     UTT_IsMemberPointer,
     49     UTT_IsObject,
     50     UTT_IsPOD,
     51     UTT_IsPointer,
     52     UTT_IsPolymorphic,
     53     UTT_IsReference,
     54     UTT_IsRvalueReference,
     55     UTT_IsScalar,
     56     UTT_IsSigned,
     57     UTT_IsStandardLayout,
     58     UTT_IsTrivial,
     59     UTT_IsTriviallyCopyable,
     60     UTT_IsUnion,
     61     UTT_IsUnsigned,
     62     UTT_IsVoid,
     63     UTT_IsVolatile
     64   };
     65 
     66   /// \brief Names for the binary type traits.
     67   enum BinaryTypeTrait {
     68     BTT_IsBaseOf,
     69     BTT_IsConvertible,
     70     BTT_IsConvertibleTo,
     71     BTT_IsSame,
     72     BTT_TypeCompatible,
     73     BTT_IsTriviallyAssignable
     74   };
     75 
     76   /// \brief Names for the array type traits.
     77   enum ArrayTypeTrait {
     78     ATT_ArrayRank,
     79     ATT_ArrayExtent
     80   };
     81 
     82   /// \brief Names for the "expression or type" traits.
     83   enum UnaryExprOrTypeTrait {
     84     UETT_SizeOf,
     85     UETT_AlignOf,
     86     UETT_VecStep
     87   };
     88 
     89   /// \brief Names for type traits that operate specifically on types.
     90   enum TypeTrait {
     91     TT_IsTriviallyConstructible
     92   };
     93 
     94 }
     95 
     96 #endif
     97