[interop][SwiftToCxx] add a Swift stdlib overlay header

It currently provides begin and end functions for array iteration
This commit is contained in:
Alex Lorenz
2022-09-29 07:34:31 -07:00
parent 599874a9f4
commit dd7e068391
8 changed files with 121 additions and 11 deletions

View File

@@ -37,6 +37,12 @@ int main() {
{
Array<int> val = UseArray::createArray(2);
UseArray::printArray(UseArray::passthroughArray(val));
int count = 2;
for (int x: val) {
assert(x == 2);
--count;
}
assert(count == 0);
}
// CHECK: [2, 2]
{