ContainerTypeOperations is a class template representing type traits for
various generic container operations, such as storage initialization or bulk copy. This can be used, for instance, to use memcpy for efficient copying for specific types. This will be used in HashTable v2 (see bug).
The set of operations are mostly inspired by Vector's traits. This traits is intended to become the unified traits that can be applied to any WTF containers (currently, Vector and HashTable have separate sets of traits).
This patch only provides a basic implementation that should work for any types. Specializations for other types will be added later.
Bug: 715430 Change-Id: Ie1fb852942e4f6210eef26cad7606833c5d1949f Reviewed-on: https://chromium-review.googlesource.com/641290
34aae08 WTF HashTable v2: Add ContainerTypeOperations.
third_party/WebKit/Source/platform/wtf/BUILD.gn | 2 +
.../wtf/experimental/ContainerTypeOperations.h | 610 +++++++++++++++++++++
.../experimental/ContainerTypeOperationsTest.cpp | 81 +++
3 files changed, 693 insertions(+)