Files
swift-mirror/stdlib/public/Cxx/std/std.apinotes
Gabor Horvath 43cef148cb [cxx-interop] Do not consider std::span<T>::size and co unsafe
Since these APIs operate on unsafes we consider them unsafe by default.
This PR adds APINotes to override these defaults as these APIs will not
touch the underlying buffer. This should slightly reduce the number of
`unsafe`s in user code.

rdar://159839254
2025-09-25 11:28:26 +01:00

36 lines
747 B
Plaintext

Name: std
Functions:
- Name: abs
Availability: nonswift
AvailabilityMsg: Use the C standard library function
- Name: div
Availability: nonswift
AvailabilityMsg: Use the C standard library function
Namespaces:
- Name: std
Tags:
- Name: basic_string
SwiftImportAs: owned
- Name: vector
SwiftImportAs: owned
- Name: span
Methods:
- Name: data
SwiftName: __dataUnsafe()
- Name: size
SwiftSafety: safe
- Name: size_bytes
SwiftSafety: safe
- Name: empty
SwiftSafety: safe
- Name: basic_string_view
Methods:
- Name: size
SwiftSafety: safe
- Name: max_size
SwiftSafety: safe
- Name: length
SwiftSafety: safe
- Name: empty
SwiftSafety: safe