Avatar
public subscript() -> T { @_transparent unsafeAddress { UnsafePointer<T>(pointer) } @_transparent nonmutating unsafeMutableAddress { pointer } }
7:12 AM
こんなの書けるんですね
7:13 AM
let intOnHeap = Box<Int>(0) XCTAssertEqual(intOnHeap[], 0) なるほどそのまま引数のないsubscriptになるのか