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