diff options
author | Evan Brown <ezb@google.com> | 2024-03-13 11:59:30 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2024-03-13 12:00:20 -0700 |
commit | c6ed744ea531edf745b55c4e5679d7e435406c0d (patch) | |
tree | 22774d73af93958b296fd1634f2577329e9f7a92 /absl/container/flat_hash_map.h | |
parent | e4b07ec1fc6885eca8a1d8d2439a6554b4a81378 (diff) | |
download | abseil-c6ed744ea531edf745b55c4e5679d7e435406c0d.tar.gz abseil-c6ed744ea531edf745b55c4e5679d7e435406c0d.tar.bz2 abseil-c6ed744ea531edf745b55c4e5679d7e435406c0d.zip |
Roll back extern template instatiations in swisstable due to binary size increases in shared libraries.
PiperOrigin-RevId: 615497725
Change-Id: Ic29db8923ea4ea7cd0b01b396896fa9fff8c74b0
Diffstat (limited to 'absl/container/flat_hash_map.h')
-rw-r--r-- | absl/container/flat_hash_map.h | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/absl/container/flat_hash_map.h b/absl/container/flat_hash_map.h index 2f4457d6..a33c794f 100644 --- a/absl/container/flat_hash_map.h +++ b/absl/container/flat_hash_map.h @@ -31,20 +31,15 @@ #define ABSL_CONTAINER_FLAT_HASH_MAP_H_ #include <cstddef> -#include <cstdint> -#include <memory> #include <new> -#include <string> #include <type_traits> #include <utility> #include "absl/algorithm/container.h" -#include "absl/base/config.h" #include "absl/base/macros.h" #include "absl/container/internal/container_memory.h" #include "absl/container/internal/hash_function_defaults.h" // IWYU pragma: export #include "absl/container/internal/raw_hash_map.h" // IWYU pragma: export -#include "absl/container/internal/raw_hash_set.h" // IWYU pragma: export #include "absl/memory/memory.h" namespace absl { @@ -637,42 +632,6 @@ struct IsUnorderedContainer< } // namespace container_algorithm_internal -// Explicit template instantiations for common map types in order to decrease -// linker input size. Note that explicitly instantiating flat_hash_map itself -// doesn't help because it has no non-alias members. If we need to decrease -// linker input size more, we could potentially (a) add more key/value types, -// e.g. string_view/Cord, (b) instantiate some template member functions, e.g. -// operator[]/find. The EXTERN argument is `extern` for the declaration and -// empty for the definition. -#define ABSL_INTERNAL_TEMPLATE_FLAT_HASH_MAP(TEMPLATE, KEY, VALUE) \ - TEMPLATE class absl::container_internal::raw_hash_map< \ - absl::container_internal::FlatHashMapPolicy<KEY, VALUE>, \ - absl::container_internal::hash_default_hash<KEY>, \ - absl::container_internal::hash_default_eq<KEY>, \ - std::allocator<std::pair<const KEY, VALUE>>>; \ - TEMPLATE class absl::container_internal::raw_hash_set< \ - absl::container_internal::FlatHashMapPolicy<KEY, VALUE>, \ - absl::container_internal::hash_default_hash<KEY>, \ - absl::container_internal::hash_default_eq<KEY>, \ - std::allocator<std::pair<const KEY, VALUE>>>; - -// We use exact-width integer types rather than `int`/`long`/`long long` because -// these are the types recommended in the Google C++ style guide and which are -// commonly used in Google code. -ABSL_INTERNAL_TEMPLATE_FLAT_HASH_MAP(extern template, int32_t, int32_t); -ABSL_INTERNAL_TEMPLATE_FLAT_HASH_MAP(extern template, std::string, int32_t); -ABSL_INTERNAL_TEMPLATE_FLAT_HASH_MAP(extern template, int32_t, std::string); -ABSL_INTERNAL_TEMPLATE_FLAT_HASH_MAP(extern template, int64_t, int64_t); -ABSL_INTERNAL_TEMPLATE_FLAT_HASH_MAP(extern template, std::string, int64_t); -ABSL_INTERNAL_TEMPLATE_FLAT_HASH_MAP(extern template, int64_t, std::string); -ABSL_INTERNAL_TEMPLATE_FLAT_HASH_MAP(extern template, uint32_t, uint32_t); -ABSL_INTERNAL_TEMPLATE_FLAT_HASH_MAP(extern template, std::string, uint32_t); -ABSL_INTERNAL_TEMPLATE_FLAT_HASH_MAP(extern template, uint32_t, std::string); -ABSL_INTERNAL_TEMPLATE_FLAT_HASH_MAP(extern template, uint64_t, uint64_t); -ABSL_INTERNAL_TEMPLATE_FLAT_HASH_MAP(extern template, std::string, uint64_t); -ABSL_INTERNAL_TEMPLATE_FLAT_HASH_MAP(extern template, uint64_t, std::string); -ABSL_INTERNAL_TEMPLATE_FLAT_HASH_MAP(extern template, std::string, std::string); - ABSL_NAMESPACE_END } // namespace absl |