Initializer

init(bitPattern:)

Creates a new pointer from the given address, specified as a bit pattern. 新しいポインタをこの与えられたアドレスから作成します、ビットパターンとして指定されます。

Declaration 宣言

init?(bitPattern: UInt)

Parameters パラメータ

bitPattern

A bit pattern to use for the address of the new pointer. If bitPattern is zero, the result is nil. 新しいポインタのアドレスのために使われるビットパターン。bitPatternがゼロならば、結果はnilです。

Discussion 解説

The address passed as bitPattern must have the correct alignment for the pointer’s Pointee type. That is, bitPattern % MemoryLayout<Pointee>.alignment must be 0. bitPatternとして渡されるアドレスは、ポインタの持つPointee型に対して整合状態でなければなりません。すなわち、bitPattern % MemoryLayout<Pointee>.alignmentは、0でなければなりません。