From bd49521279efd07c65b3e06feda9e8ee1cf07dca Mon Sep 17 00:00:00 2001 From: Hiroshi Yamauchi <56735936+hjyamauchi@users.noreply.github.com> Date: Wed, 6 Dec 2023 12:01:12 -0800 Subject: [PATCH] Add using for some types to work around compiler crash SR70253 (#14) 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