mirror of
https://github.com/apple/swift.git
synced 2026-10-10 13:50:43 +02:00
Adds a new DocC article that walks developers through the process of using Swift/C++ interoperability with Swift Package Manager, Command-line, and Xcode. The article covers all three development tools so regardless of the reader's platform, they can follow along. The running example bridges a C++ class named Error, which collides with Swift's own Error type and renames it to CxxErrorExample as it crosses into Swift using the SWIFT_NAME macro from swift/bridging. This demonstrates how to reshape a C++ API so it reads like Swift instead of clashing with existing types. --------- Co-authored-by: Joey Brinker <brinkerjoey@outlook.com> Co-authored-by: Colleen Toporek <colleenish@gmail.com> Co-authored-by: Chris Adamson <invalidname@gmail.com>
48 lines
868 B
Markdown
48 lines
868 B
Markdown
# C++ Interoperability
|
|
|
|
Work with standard C++ types.
|
|
|
|
|
|
## Topics
|
|
|
|
### Essentials
|
|
|
|
- <doc:enabling-c++-interoperability-in-your-project>
|
|
|
|
### Boolean Values
|
|
|
|
- ``Cxx/CxxConvertibleToBool``
|
|
|
|
### Optional Values
|
|
|
|
- ``Cxx/CxxOptional``
|
|
|
|
### Collections
|
|
|
|
- ``Cxx/CxxDictionary``
|
|
- ``Cxx/CxxRandomAccessCollection``
|
|
- ``Cxx/CxxMutableRandomAccessCollection``
|
|
- ``Cxx/CxxVector``
|
|
- ``Cxx/CxxSet``
|
|
- ``Cxx/CxxUniqueSet``
|
|
- ``Cxx/CxxPair``
|
|
- ``Cxx/CxxConvertibleToCollection``
|
|
|
|
### Sequences
|
|
|
|
- ``Cxx/CxxSequence``
|
|
- ``Cxx/CxxIterator``
|
|
- ``Cxx/CxxSpan``
|
|
- ``Cxx/CxxMutableSpan``
|
|
- ``Cxx/UnsafeCxxContiguousIterator``
|
|
- ``Cxx/UnsafeCxxInputIterator``
|
|
- ``Cxx/UnsafeCxxMutableContiguousIterator``
|
|
- ``Cxx/UnsafeCxxMutableInputIterator``
|
|
- ``Cxx/UnsafeCxxMutableRandomAccessIterator``
|
|
- ``Cxx/UnsafeCxxRandomAccessIterator``
|
|
|
|
### Comparison Functions
|
|
|
|
- ``CxxStdlib/==(_:_:)``
|
|
|