Commit Graph

5 Commits

Author SHA1 Message Date
Egor Zhdan
e9dd9109e7 [cxx-interop] Update the std::pair safety test
The test was passing by accident: we didn't properly check `std::pair` type for completeness, and assumed that it is incomplete.

This updates the test to actually verify the behavior that is specified in the vision document.
2024-01-12 16:21:43 +00:00
Egor Zhdan
6902041e34 [cxx-interop] Force creating a memberwise init for std::pair
In libc++, `pair()` and `pair(_T1 const& __t1, _T2 const& __t2)` are templated with `enable_if`, so these initializers are not imported into Swift.

There should be a way to call `std.pair.init` from Swift, so this change makes sure Swift synthesizes a memberwise initializer for `std.pair`.

rdar://113135110
2023-08-01 18:59:41 +01:00
Egor Zhdan
f2771584df [cxx-interop] Do not treat std::pair<UnsafeType, T> as safe
rdar://109529750
2023-06-01 14:00:03 +01:00
Alex Lorenz
861d99fa25 [interop] expand std.pair tests after non-trivial record fix 2023-03-17 17:02:14 -07:00
Alex Lorenz
827af150ab [interop] ensure std::pair is imported into Swift 2023-03-14 07:29:48 -07:00