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

Unified Diff: Source/wtf/VectorTraits.h

Issue 249363002: Use macros instead of specializing VectorTraits explicitly (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 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
« no previous file with comments | « Source/core/inspector/InspectorStyleSheet.h ('k') | Source/wtf/text/WTFString.h » ('j') | 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 fe54ffe3fa512047f6d87099c530c75d452f40de..d93fa516f38fc626a14484cd98b58941aa2f3df1 100644
--- a/Source/wtf/VectorTraits.h
+++ b/Source/wtf/VectorTraits.h
@@ -100,6 +100,16 @@ namespace WTF { \
struct VectorTraits<ClassName> : SimpleClassVectorTraits<ClassName> { }; \
}
+#define WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(ClassName) \
+namespace WTF { \
+ template<> \
+ struct VectorTraits<ClassName> : VectorTraitsBase<ClassName> \
+ { \
+ static const bool canInitializeWithMemset = true; \
+ static const bool canMoveWithMemcpy = true; \
+ }; \
+}
+
using WTF::VectorTraits;
using WTF::SimpleClassVectorTraits;
« no previous file with comments | « Source/core/inspector/InspectorStyleSheet.h ('k') | Source/wtf/text/WTFString.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698