Say I define a type like this:
struct P<each T> {
init(_ t: repeat (each T).Type) {}
}
…and a function that accepts it:
func foo<each T>(p: P<each T>) {
// do something with `p`
}
Is there any way to spell the static type of an empty parameter pack? For example, if I write:
let a = P(Int.self) // P<Int>
let b = P(String.self, Double.self) // P<String, Double>
let c = P() // P<> ????
Can I write an explicit type annotation for c
? What is its type? Is this something that can't be expressed until the Explicit type pack syntax future direction is explored?