From e59cf7b09e7388d369e8d2bf73501cde79c28708 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Thu, 8 Apr 2021 16:43:58 +0200 Subject: Squashed 'EASTL/' content from commit fad5471 git-subtree-dir: EASTL git-subtree-split: fad54717f8e4ebb13b20095da7efd07a53af0f10 --- include/EASTL/unordered_map.h | 55 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 include/EASTL/unordered_map.h (limited to 'include/EASTL/unordered_map.h') diff --git a/include/EASTL/unordered_map.h b/include/EASTL/unordered_map.h new file mode 100644 index 0000000..10c6b88 --- /dev/null +++ b/include/EASTL/unordered_map.h @@ -0,0 +1,55 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) Electronic Arts Inc. All rights reserved. +/////////////////////////////////////////////////////////////////////////////// + +#ifndef EASTL_UNORDERED_MAP_H +#define EASTL_UNORDERED_MAP_H + +#include +#include + +#if defined(EA_PRAGMA_ONCE_SUPPORTED) + #pragma once // Some compilers (e.g. VC++) benefit significantly from using this. We've measured 3-4% build speed improvements in apps as a result. +#endif + +namespace eastl +{ + /// unordered_map + /// + /// The original TR1 (technical report 1) used "hash_map" to name a hash + /// table backed associative container of unique key-value pairs. When the + /// container was added to the C++11 standard the committee chose the name + /// "unordered_map" to clarify that internally the elements are NOT sorted in + /// any particular order. We provide a template alias here to ensure feature + /// parity with the original eastl::hash_map. + /// + #if !defined(EA_COMPILER_NO_TEMPLATE_ALIASES) + template , + typename Predicate = eastl::equal_to, + typename Allocator = EASTLAllocatorType, + bool bCacheHashCode = false> + using unordered_map = hash_map; + #endif + + + /// unordered_multimap + /// + /// Similar template alias as "unordered_map" except the contained elements + /// need not be unique. See "hash_multimap" for more details. + /// + #if !defined(EA_COMPILER_NO_TEMPLATE_ALIASES) + template , + typename Predicate = eastl::equal_to, + typename Allocator = EASTLAllocatorType, + bool bCacheHashCode = false> + using unordered_multimap = hash_multimap; + #endif + +} // namespace eastl + +#endif // Header include guard + -- cgit v1.2.3