| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. | 3 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 // | 36 // |
| 37 // IsSameType<T, U>::value | 37 // IsSameType<T, U>::value |
| 38 // | 38 // |
| 39 // RemovePointer<T>::Type | 39 // RemovePointer<T>::Type |
| 40 // RemoveReference<T>::Type | 40 // RemoveReference<T>::Type |
| 41 // RemoveConst<T>::Type | 41 // RemoveConst<T>::Type |
| 42 // RemoveVolatile<T>::Type | 42 // RemoveVolatile<T>::Type |
| 43 // RemoveConstVolatile<T>::Type | 43 // RemoveConstVolatile<T>::Type |
| 44 // RemoveExtent<T>::Type | 44 // RemoveExtent<T>::Type |
| 45 // | 45 // |
| 46 // COMPILE_ASSERT's in TypeTraits.cpp illustrate their usage and what they
do. | 46 // static_assert's in TypeTraits.cpp illustrate their usage and what they
do. |
| 47 | 47 |
| 48 template<bool Predicate, class T = void> struct EnableIf; | 48 template<bool Predicate, class T = void> struct EnableIf; |
| 49 template<class T> struct EnableIf<true, T> { typedef T Type; }; | 49 template<class T> struct EnableIf<true, T> { typedef T Type; }; |
| 50 | 50 |
| 51 template<typename T> struct IsInteger { static const bool value =
false; }; | 51 template<typename T> struct IsInteger { static const bool value =
false; }; |
| 52 template<> struct IsInteger<bool> { static const bool value =
true; }; | 52 template<> struct IsInteger<bool> { static const bool value =
true; }; |
| 53 template<> struct IsInteger<char> { static const bool value =
true; }; | 53 template<> struct IsInteger<char> { static const bool value =
true; }; |
| 54 template<> struct IsInteger<signed char> { static const bool value =
true; }; | 54 template<> struct IsInteger<signed char> { static const bool value =
true; }; |
| 55 template<> struct IsInteger<unsigned char> { static const bool value =
true; }; | 55 template<> struct IsInteger<unsigned char> { static const bool value =
true; }; |
| 56 template<> struct IsInteger<short> { static const bool value =
true; }; | 56 template<> struct IsInteger<short> { static const bool value =
true; }; |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 }; | 346 }; |
| 347 | 347 |
| 348 template<typename T, typename U> | 348 template<typename T, typename U> |
| 349 struct NeedsTracing<std::pair<T, U> > { | 349 struct NeedsTracing<std::pair<T, U> > { |
| 350 static const bool value = NeedsTracing<T>::value || NeedsTracing<U>::value |
| IsWeak<T>::value || IsWeak<U>::value; | 350 static const bool value = NeedsTracing<T>::value || NeedsTracing<U>::value |
| IsWeak<T>::value || IsWeak<U>::value; |
| 351 }; | 351 }; |
| 352 | 352 |
| 353 } // namespace WTF | 353 } // namespace WTF |
| 354 | 354 |
| 355 #endif // TypeTraits_h | 355 #endif // TypeTraits_h |
| OLD | NEW |