> On Jun 2, 2016, at 9:48 AM, Matthew Johnson via swift-evolution > <[email protected]> wrote: > > struct MemoryLayout<T> { > init() {} > init(t: T) { /* throw away the value */ } > > // we could omit the static properties and require > // writing MemoryLayout<Int>() if we don’t like the duplication > static let size: Int > static let spacing: Int > static let alignment: Int > > let size: Int > let spacing: Int > let alignment: Int > } > > let size = MemoryLayout<Int>.size > let sizeOfValue = MemoryLayout(42).size
And amended Alternatives with this. :) - E
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
