Skip to content

Commit 490db49

Browse files
committed
[cxx-interop] NFC: Add documentation comment for CxxSequence.makeIterator
Clarify that calling `makeIterator` on a C++ sequence has `O(n)` complexity.
1 parent e5e9827 commit 490db49

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

stdlib/public/Cxx/CxxSequence.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ public struct CxxIterator<T>: IteratorProtocol where T: CxxSequence {
123123
}
124124

125125
extension CxxSequence {
126+
/// Returns an iterator over the elements of this C++ container.
127+
///
128+
/// - Complexity: O(*n*), where *n* is the number of elements in the C++
129+
/// container.
126130
@inlinable
127131
public func makeIterator() -> CxxIterator<Self> {
128132
return CxxIterator(sequence: self)

0 commit comments

Comments
 (0)