mirror of
https://github.com/apple/swift.git
synced 2026-09-28 10:03:29 +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>
868 B
868 B
C++ Interoperability
Work with standard C++ types.
Topics
Essentials
Boolean Values
Cxx/CxxConvertibleToBool
Optional Values
Cxx/CxxOptional
Collections
Cxx/CxxDictionaryCxx/CxxRandomAccessCollectionCxx/CxxMutableRandomAccessCollectionCxx/CxxVectorCxx/CxxSetCxx/CxxUniqueSetCxx/CxxPairCxx/CxxConvertibleToCollection
Sequences
Cxx/CxxSequenceCxx/CxxIteratorCxx/CxxSpanCxx/CxxMutableSpanCxx/UnsafeCxxContiguousIteratorCxx/UnsafeCxxInputIteratorCxx/UnsafeCxxMutableContiguousIteratorCxx/UnsafeCxxMutableInputIteratorCxx/UnsafeCxxMutableRandomAccessIteratorCxx/UnsafeCxxRandomAccessIterator
Comparison Functions
CxxStdlib/==(_:_:)