summaryrefslogtreecommitdiff
path: root/absl/functional/function_ref_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'absl/functional/function_ref_test.cc')
-rw-r--r--absl/functional/function_ref_test.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/absl/functional/function_ref_test.cc b/absl/functional/function_ref_test.cc
index 412027cd..d0923fdd 100644
--- a/absl/functional/function_ref_test.cc
+++ b/absl/functional/function_ref_test.cc
@@ -253,6 +253,16 @@ TEST(FunctionRef, PassByValueTypes) {
}
}
+TEST(FunctionRef, ReferenceToIncompleteType) {
+ struct IncompleteType;
+ auto test = [](IncompleteType&) {};
+ absl::FunctionRef<void(IncompleteType&)> ref(test);
+
+ struct IncompleteType {};
+ IncompleteType obj;
+ ref(obj);
+}
+
} // namespace
ABSL_NAMESPACE_END
} // namespace absl