@@ -1814,15 +1814,14 @@ internal struct RawKeyPathComponent {
18141814 }
18151815}
18161816
1817- internal func _pop< T> ( from: inout UnsafeRawBufferPointer ,
1817+ internal func _pop< T : _BitwiseCopyable > ( from: inout UnsafeRawBufferPointer ,
18181818 as type: T . Type ) -> T {
18191819 let buffer = _pop ( from: & from, as: type, count: 1 )
18201820 return buffer. baseAddress. unsafelyUnwrapped. pointee
18211821}
1822- internal func _pop< T> ( from: inout UnsafeRawBufferPointer ,
1822+ internal func _pop< T : _BitwiseCopyable > ( from: inout UnsafeRawBufferPointer ,
18231823 as: T . Type ,
18241824 count: Int ) -> UnsafeBufferPointer < T > {
1825- _internalInvariant ( _isPOD ( T . self) , " should be POD " )
18261825 from = MemoryLayout< T> . _roundingUpBaseToAlignment( from)
18271826 let byteCount = MemoryLayout < T > . stride * count
18281827 let result = UnsafeBufferPointer (
@@ -3414,8 +3413,7 @@ internal struct InstantiateKeyPathBuffer: KeyPathPatternVisitor {
34143413 }
34153414 return ( baseAddress, misalign)
34163415 }
3417- mutating func pushDest< T> ( _ value: T ) {
3418- _internalInvariant ( _isPOD ( T . self) )
3416+ mutating func pushDest< T : _BitwiseCopyable > ( _ value: T ) {
34193417 let size = MemoryLayout< T> . size
34203418 let ( baseAddress, misalign) = adjustDestForAlignment ( of: T . self)
34213419 _withUnprotectedUnsafeBytes ( of: value) {
0 commit comments