Skip to content

Commit 5570daf

Browse files
committed
Docs: fix a few examples in the C++ interop manifesto
This change fixes the syntax in a few code snippets to make them valid Swift.
1 parent ce660f5 commit 5570daf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/CppInteroperabilityManifesto.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -407,13 +407,13 @@ void printInt(const int &value);
407407
```swift
408408
// C++ header imported in Swift.
409409
410-
void printInt(_ value: UnsafePointer<Int>)
410+
func printInt(_ value: UnsafePointer<Int>)
411411
```
412412

413413
```swift
414414
// Usage example.
415415

416-
void caller() {
416+
func caller() {
417417
var x = 42
418418
printInt(&x) // OK
419419

@@ -450,13 +450,13 @@ void printInt(const int &value);
450450
```swift
451451
// C++ header imported in Swift.
452452
453-
void printInt(_ value: Int)
453+
func printInt(_ value: Int)
454454
```
455455

456456
```swift
457457
// Usage example.
458458

459-
void caller() {
459+
func caller() {
460460
let x = 42
461461
printInt(y) // OK
462462
}

0 commit comments

Comments
 (0)