14 #ifndef LLVM_SUPPORT_TYPE_TRAITS_H 15 #define LLVM_SUPPORT_TYPE_TRAITS_H 17 #include <type_traits> 20 #include "llvm/Compiler.h" 30 #if (__has_feature(is_trivially_copyable) && defined(_LIBCPP_VERSION)) || \ 31 (defined(__GNUC__) && __GNUC__ >= 5) 34 static const bool value = std::is_trivially_copyable<T>::value;
35 #elif __has_feature(is_trivially_copyable) 39 static const bool value = __is_trivially_copyable(T);
43 static const bool value = !std::is_class<T>::value;
48 template<
typename T,
typename U>
61 typedef typename std::remove_reference<T>::type UnderlyingT;
64 static const bool value =
65 !std::is_class<UnderlyingT>::value &&
66 !std::is_pointer<UnderlyingT>::value &&
67 !std::is_floating_point<UnderlyingT>::value &&
68 (std::is_enum<UnderlyingT>::value ||
69 std::is_convertible<UnderlyingT, unsigned long long>::value);
73 template<
typename T,
typename Enable =
void>
78 T, typename
std::enable_if<std::is_pointer<T>::value>::type> {
84 template<
typename T,
typename Enable =
void>
89 T, typename
std::enable_if<std::is_pointer<T>::value>::type> {
90 typedef const typename std::remove_pointer<T>::type *type;
Definition: json.cpp:1170
Metafunction that determines whether the given type is either an integral type or an enumeration type...
Definition: type_traits.h:60
If T is a pointer to X, return a pointer to const X.
Definition: type_traits.h:85
isPodLike - This is a type trait that is used to determine whether a given type can be copied around ...
Definition: Optional.h:147
If T is a pointer, just return it. If it is not, return T&.
Definition: type_traits.h:74