@@ -1814,15 +1814,14 @@ internal struct RawKeyPathComponent {
1814
1814
}
1815
1815
}
1816
1816
1817
- internal func _pop< T> ( from: inout UnsafeRawBufferPointer ,
1817
+ internal func _pop< T : _BitwiseCopyable > ( from: inout UnsafeRawBufferPointer ,
1818
1818
as type: T . Type ) -> T {
1819
1819
let buffer = _pop ( from: & from, as: type, count: 1 )
1820
1820
return buffer. baseAddress. unsafelyUnwrapped. pointee
1821
1821
}
1822
- internal func _pop< T> ( from: inout UnsafeRawBufferPointer ,
1822
+ internal func _pop< T : _BitwiseCopyable > ( from: inout UnsafeRawBufferPointer ,
1823
1823
as: T . Type ,
1824
1824
count: Int ) -> UnsafeBufferPointer < T > {
1825
- _internalInvariant ( _isPOD ( T . self) , " should be POD " )
1826
1825
from = MemoryLayout< T> . _roundingUpBaseToAlignment( from)
1827
1826
let byteCount = MemoryLayout < T > . stride * count
1828
1827
let result = UnsafeBufferPointer (
@@ -3414,8 +3413,7 @@ internal struct InstantiateKeyPathBuffer: KeyPathPatternVisitor {
3414
3413
}
3415
3414
return ( baseAddress, misalign)
3416
3415
}
3417
- mutating func pushDest< T> ( _ value: T ) {
3418
- _internalInvariant ( _isPOD ( T . self) )
3416
+ mutating func pushDest< T : _BitwiseCopyable > ( _ value: T ) {
3419
3417
let size = MemoryLayout< T> . size
3420
3418
let ( baseAddress, misalign) = adjustDestForAlignment ( of: T . self)
3421
3419
_withUnprotectedUnsafeBytes ( of: value) {
0 commit comments