Deleted Added
sdiff udiff text old ( 243830 ) new ( 249423 )
full compact
1//===- llvm/Support/type_traits.h - Simplfied type traits -------*- 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//===----------------------------------------------------------------------===//

--- 131 unchanged lines hidden (view full) ---

140/// \brief Metafunction that determines whether the given type is a pointer
141/// type.
142template <typename T> struct is_pointer : false_type {};
143template <typename T> struct is_pointer<T*> : true_type {};
144template <typename T> struct is_pointer<T* const> : true_type {};
145template <typename T> struct is_pointer<T* volatile> : true_type {};
146template <typename T> struct is_pointer<T* const volatile> : true_type {};
147
148/// \brief Metafunction that determines whether the given type is either an
149/// integral type or an enumeration type.
150///
151/// Note that this accepts potentially more integral types than we whitelist
152/// above for is_integral because it is based on merely being convertible
153/// implicitly to an integral type.
154template <typename T> class is_integral_or_enum {
155 // Provide an overload which can be called with anything implicitly

--- 44 unchanged lines hidden (view full) ---

200// C++0x [meta.trans.ptr].
201template <typename T> struct remove_pointer { typedef T type; };
202template <typename T> struct remove_pointer<T*> { typedef T type; };
203template <typename T> struct remove_pointer<T*const> { typedef T type; };
204template <typename T> struct remove_pointer<T*volatile> { typedef T type; };
205template <typename T> struct remove_pointer<T*const volatile> {
206 typedef T type; };
207
208template <bool, typename T, typename F>
209struct conditional { typedef T type; };
210
211template <typename T, typename F>
212struct conditional<false, T, F> { typedef F type; };
213
214}
215
216#ifdef LLVM_DEFINED_HAS_FEATURE
217#undef __has_feature
218#endif
219
220#endif