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

Unified Diff: Source/wtf/VectorTraits.h

Issue 654933004: Remove now-unnecessary VectorTraits specializations. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 months 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 side-by-side diff with in-line comments
Download patch
« Source/core/rendering/RenderTableSection.h ('K') | « Source/wtf/VectorTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/VectorTraits.h
diff --git a/Source/wtf/VectorTraits.h b/Source/wtf/VectorTraits.h
index 2b6544ce35239b8d755ebc3a534c09f5d994d73e..4a6209e0805e65dbd9a4487e5881b137269fdbfa 100644
--- a/Source/wtf/VectorTraits.h
+++ b/Source/wtf/VectorTraits.h
@@ -24,6 +24,7 @@
#include "wtf/OwnPtr.h"
#include "wtf/RefPtr.h"
#include "wtf/TypeTraits.h"
+#include <type_traits>
#include <utility>
using std::pair;
@@ -35,12 +36,12 @@ namespace WTF {
template<typename T>
struct VectorTraitsBase
{
- static const bool needsDestruction = !IsPod<T>::value;
- static const bool canInitializeWithMemset = IsPod<T>::value;
- static const bool canMoveWithMemcpy = IsPod<T>::value;
- static const bool canCopyWithMemcpy = IsPod<T>::value;
- static const bool canFillWithMemset = IsPod<T>::value && (sizeof(T) == sizeof(char));
- static const bool canCompareWithMemcmp = IsPod<T>::value;
+ static const bool needsDestruction = !std::is_trivially_destructible<T>::value;
+ static const bool canInitializeWithMemset = std::is_pod<T>::value;
+ static const bool canMoveWithMemcpy = std::is_pod<T>::value;
+ static const bool canCopyWithMemcpy = std::is_pod<T>::value;
+ static const bool canFillWithMemset = std::is_pod<T>::value && (sizeof(T) == sizeof(char));
+ static const bool canCompareWithMemcmp = std::is_pod<T>::value;
template<typename U = void>
struct NeedsTracingLazily {
static const bool value = NeedsTracing<T>::value;
« Source/core/rendering/RenderTableSection.h ('K') | « Source/wtf/VectorTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698