From 3efcbf255596aab63aaac78afdf24baa0d86838e Mon Sep 17 00:00:00 2001 From: Hiroshi Yamauchi Date: Tue, 5 Dec 2023 11:56:22 -0800 Subject: [PATCH] Add using for some types to work around compiler crash SR70253 Reference some types so that they are included in the CXX module. --- .../src/include/firebase/firestore/map_field_value.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/firestore/src/include/firebase/firestore/map_field_value.h b/firestore/src/include/firebase/firestore/map_field_value.h index 8c67c05a10..a63cfe70d9 100644 --- a/firestore/src/include/firebase/firestore/map_field_value.h +++ b/firestore/src/include/firebase/firestore/map_field_value.h @@ -31,6 +31,15 @@ using MapFieldValue = std::unordered_map; /** @brief A map of `FieldValue`s indexed by field paths. */ using MapFieldPathValue = std::unordered_map; +#if defined(__swift__) +// Reference the following types so that they are included in the CXX +// module. A workaround for deserialization cross reference compiler +// crashes https://github.com/apple/swift/issues/70253 +using FieldValueVector = std::vector; +using FieldValueVectorConstIterator = std::_Vector_const_iterator>>; +using StringVectorConstIterator = std::vector::const_iterator; +#endif + } // namespace firestore } // namespace firebase