17 #ifndef LLVM_SUPPORT_TYPE_TRAITS_H
18 #define LLVM_SUPPORT_TYPE_TRAITS_H
20 #include "llvm/Support/DataTypes.h"
25 #define LLVM_DEFINED_HAS_FEATURE
26 #define __has_feature(x) 0
59 sizeof(char) ==
sizeof(dont_use::is_class_helper<T>(0));
67 #if __has_feature(is_trivially_copyable)
70 static const bool value = __is_trivially_copyable(
T);
79 template<
typename T,
typename U>
85 template <
class T, T v>
133 template <
typename T>
163 static double check_int_convertible(
unsigned long long);
164 static char check_int_convertible(...);
174 sizeof(char) !=
sizeof(check_int_convertible(nonce_instance)));
178 template<
bool Cond,
typename T =
void>
186 template<
typename Cond,
typename T =
void>
190 template<
typename Base>
char base_of_helper(
const volatile Base*);
196 template<
typename Base,
typename Derived>
198 static const bool value
200 sizeof(char) ==
sizeof(dont_use::base_of_helper<Base>((Derived*)0));
213 template<
typename T,
typename Enable =
void>
224 template<
typename T,
typename Enable =
void>
232 template <
bool,
typename T,
typename F>
235 template <
typename T,
typename F>
240 #ifdef LLVM_DEFINED_HAS_FEATURE
Metafunction that removes both const and volatile qualification from a type.
Helper to implement is_integral metafunction.
Metafunction that determines whether the given type is an integral type.
Metafunction that determines whether the given type is a pointer type.
integral_constant< T, v > type
char is_class_helper(void(T::*)())
Metafunction that determines whether the given type is either an integral type or an enumeration type...
remove_const< typename remove_volatile< T >::type >::type type
Metafunction that determines whether the two given types are equivalent.
Metafunction that removes volatile qualification from a type.
integral_constant< bool, false > false_type
Metafunction to remove reference from a type.
static const value_type value
Metafunction that removes const qualification from a type.
const remove_pointer< T >::type * type
Metafunction that determines wheather the given type is a reference.
char base_of_helper(const volatile Base *)
integral_constant< bool, true > true_type