mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Previously, we would get two copies, one accessing the pointee and one when we pass the pointee as a method as the implicit self argument. These copies are unsafe as they might introduce slicing. When addressable paramaters features are enabled, we no longer make these copies for the standard STL types. Custom smart pointers can replicate this by making the lifetime dependency between the implicit object parameter and the returned reference of operator* explicit via a lifetime annotation. rdar://154213694&128293252&112690482
90 lines
1.2 KiB
Plaintext
90 lines
1.2 KiB
Plaintext
module StdNumeric {
|
|
header "std-numeric.h"
|
|
requires cplusplus
|
|
export *
|
|
}
|
|
|
|
module StdVector {
|
|
header "std-vector.h"
|
|
requires cplusplus
|
|
export *
|
|
}
|
|
|
|
module StdSpan {
|
|
header "std-span.h"
|
|
requires cplusplus
|
|
export *
|
|
}
|
|
|
|
module StdMap {
|
|
header "std-map.h"
|
|
requires cplusplus
|
|
export *
|
|
}
|
|
|
|
module StdOptional {
|
|
header "std-optional.h"
|
|
requires cplusplus
|
|
export *
|
|
}
|
|
|
|
module StdSet {
|
|
header "std-set.h"
|
|
requires cplusplus
|
|
export *
|
|
}
|
|
|
|
module StdString {
|
|
header "std-string.h"
|
|
requires cplusplus
|
|
export *
|
|
}
|
|
|
|
module StdStringAndVector {
|
|
header "std-string-and-vector.h"
|
|
requires cplusplus
|
|
export *
|
|
}
|
|
|
|
module StdStringView {
|
|
header "std-string-view.h"
|
|
requires cplusplus
|
|
export *
|
|
}
|
|
|
|
module StdPair {
|
|
header "std-pair.h"
|
|
requires cplusplus
|
|
export *
|
|
}
|
|
|
|
module MsvcUseVecIt {
|
|
header "msvc-std-vector-it.h"
|
|
requires cplusplus
|
|
export *
|
|
}
|
|
|
|
module StdUniquePtr {
|
|
header "std-unique-ptr.h"
|
|
requires cplusplus
|
|
export *
|
|
}
|
|
|
|
module StdFunction {
|
|
header "std-function.h"
|
|
requires cplusplus
|
|
export *
|
|
}
|
|
|
|
module NoCXXStdlib {
|
|
header "no-cxx-stdlib.h"
|
|
requires cplusplus
|
|
export *
|
|
}
|
|
|
|
module CustomSmartPtr {
|
|
header "custom-smart-ptr.h"
|
|
requires cplusplus
|
|
export *
|
|
}
|