Commit Graph

4 Commits

Author SHA1 Message Date
Egor Zhdan
c2cfd7500a [cxx-interop] Add test for explicit operator bool
rdar://137879510
2024-10-17 13:51:58 +01:00
Egor Zhdan
78b9de1391 [cxx-interop] Run tests with swift-6 compat mode 2024-02-23 16:24:14 +00:00
Egor Zhdan
bc4cffd699 [cxx-interop] Test more of stdlib with the upcoming compat version 2023-11-28 20:49:00 +00:00
Egor Zhdan
f0be52accd [cxx-interop] Add conversion to Bool for types that define operator bool()
C++ `operator bool()` is currently imported into Swift as `__convertToBool()`, which shouldn't be used by clients directly.

This adds a new protocol into the C++ stdlib overlay: `CxxConvertibleToBool`, along with an intitializer for `Swift.Bool` taking an instance of `CxxConvertibleToBool`.

rdar://115074954
2023-09-18 14:54:45 +01:00