Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: Source/wtf/TypeTraits.h

Issue 106423003: [oilpan] Rename visit to mark. (Closed) Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Address comments. Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/wtf/HashTraits.h ('k') | Source/wtf/Vector.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 template<typename T> struct IsFloatingPoint { static const bool value = false; }; 79 template<typename T> struct IsFloatingPoint { static const bool value = false; };
80 template<> struct IsFloatingPoint<float> { static const bool value = true; }; 80 template<> struct IsFloatingPoint<float> { static const bool value = true; };
81 template<> struct IsFloatingPoint<double> { static const bool value = true; }; 81 template<> struct IsFloatingPoint<double> { static const bool value = true; };
82 template<> struct IsFloatingPoint<long double> { static const bool value = true; }; 82 template<> struct IsFloatingPoint<long double> { static const bool value = true; };
83 83
84 template<typename T> struct ValidArgumentTypeTrait { static const bool value = true; }; 84 template<typename T> struct ValidArgumentTypeTrait { static const bool value = true; };
85 85
86 template<typename T> struct IsArithmetic { static const bool value = IsInteger<T>::value || IsFloatingPoint<T>::value; }; 86 template<typename T> struct IsArithmetic { static const bool value = IsInteger<T>::value || IsFloatingPoint<T>::value; };
87 87
88 template<typename T> struct NeedsVisiting { static const bool value = false; }; 88 template<typename T> struct NeedsTracing { static const bool value = false; };
89 template<typename T> struct IsWeak { static const bool value = false; }; 89 template<typename T> struct IsWeak { static const bool value = false; };
90 90
91 // IsPod is misnamed as it doesn't cover all plain old data (pod) types. 91 // IsPod is misnamed as it doesn't cover all plain old data (pod) types.
92 // Specifically, it doesn't allow for enums or for structs. 92 // Specifically, it doesn't allow for enums or for structs.
93 template <typename T> struct IsPod { static const bool value = IsArithmetic<T>::value; }; 93 template <typename T> struct IsPod { static const bool value = IsArithmetic<T>::value; };
94 template <typename P> struct IsPod<P*> { static const bool value = true; }; 94 template <typename P> struct IsPod<P*> { static const bool value = true; };
95 95
96 template<typename T> class IsConvertibleToInteger { 96 template<typename T> class IsConvertibleToInteger {
97 // Avoid "possible loss of data" warning when using Microsoft's C++ comp iler 97 // Avoid "possible loss of data" warning when using Microsoft's C++ comp iler
98 // by not converting int's to doubles. 98 // by not converting int's to doubles.
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 static const bool value = IsPod<RemoveConstVolatile<T> >::value; 257 static const bool value = IsPod<RemoveConstVolatile<T> >::value;
258 }; 258 };
259 template <typename T> struct HasTrivialDestructor { 259 template <typename T> struct HasTrivialDestructor {
260 static const bool value = IsPod<RemoveConstVolatile<T> >::value; 260 static const bool value = IsPod<RemoveConstVolatile<T> >::value;
261 }; 261 };
262 #endif 262 #endif
263 263
264 } // namespace WTF 264 } // namespace WTF
265 265
266 #endif // TypeTraits_h 266 #endif // TypeTraits_h
OLDNEW
« no previous file with comments | « Source/wtf/HashTraits.h ('k') | Source/wtf/Vector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698