I may be missing something obvious, but I haven’t been able to make the following code work:
struct Foo<each T> {
let values: (repeat each T)
}
struct Bar<each U> {
let foo: Foo<Void, repeat each U>
func callBar() {
/// Not sure how to call either of these
bar1(repeat each foo.values.1) // ERROR: Could not infer pack element #1 from context
bar2(repeat each foo.values) // ERROR: Cannot pass value pack expansion to non-pack parameter of type 'Void'
}
func bar1(_ values: repeat each U) {
}
func bar2(_ void: Void, _ values: repeat each U) {
}
}
Any suggestions on how to make something like this work?