diff options
-rw-r--r-- | absl/container/flat_hash_map_test.cc | 8 | ||||
-rw-r--r-- | absl/container/node_hash_map_test.cc | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/absl/container/flat_hash_map_test.cc b/absl/container/flat_hash_map_test.cc index 263951f1..03171f6d 100644 --- a/absl/container/flat_hash_map_test.cc +++ b/absl/container/flat_hash_map_test.cc @@ -311,6 +311,14 @@ TEST(FlatHashMap, Reserve) { } } +TEST(FlatHashMap, RecursiveTypeCompiles) { + struct RecursiveType { + flat_hash_map<int, RecursiveType> m; + }; + RecursiveType t; + t.m[0] = RecursiveType{}; +} + } // namespace } // namespace container_internal ABSL_NAMESPACE_END diff --git a/absl/container/node_hash_map_test.cc b/absl/container/node_hash_map_test.cc index e941a836..9bcf470c 100644 --- a/absl/container/node_hash_map_test.cc +++ b/absl/container/node_hash_map_test.cc @@ -272,6 +272,14 @@ TEST(NodeHashMap, NodeHandleMutableKeyAccess) { } #endif +TEST(NodeHashMap, RecursiveTypeCompiles) { + struct RecursiveType { + node_hash_map<int, RecursiveType> m; + }; + RecursiveType t; + t.m[0] = RecursiveType{}; +} + } // namespace } // namespace container_internal ABSL_NAMESPACE_END |