summaryrefslogtreecommitdiff
path: root/absl/container/flat_hash_map_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'absl/container/flat_hash_map_test.cc')
-rw-r--r--absl/container/flat_hash_map_test.cc8
1 files changed, 8 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