mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[interop][SwiftToCxx] add a Swift stdlib overlay header
It currently provides begin and end functions for array iteration
This commit is contained in:
@@ -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]
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user