File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -40,11 +40,12 @@ internal func forEachElement<C: CxxConvertibleToCollection>(
40
40
extension Array {
41
41
/// Creates an array containing the elements of a C++ container.
42
42
///
43
- /// This initializer copies each element of the C++ container to a new Swift
44
- /// array.
43
+ /// This initializes the array by copying every element of the C++ container.
45
44
///
46
45
/// - Complexity: O(*n*), where *n* is the number of elements in the C++
47
- /// container.
46
+ /// container when each element is copied in O(1). Note that this might not
47
+ /// be true for certain C++ types, e.g. those with a custom copy
48
+ /// constructor that performs additional logic.
48
49
public init < C: CxxConvertibleToCollection > ( _ c: C )
49
50
where C. RawIterator. Pointee == Element {
50
51
@@ -56,11 +57,12 @@ extension Array {
56
57
extension Set {
57
58
/// Creates an set containing the elements of a C++ container.
58
59
///
59
- /// This initializer copies each element of the C++ container to a new Swift
60
- /// set.
60
+ /// This initializes the set by copying every element of the C++ container.
61
61
///
62
62
/// - Complexity: O(*n*), where *n* is the number of elements in the C++
63
- /// container.
63
+ /// container when each element is copied in O(1). Note that this might not
64
+ /// be true for certain C++ types, e.g. those with a custom copy
65
+ /// constructor that performs additional logic.
64
66
public init < C: CxxConvertibleToCollection > ( _ c: C )
65
67
where C. RawIterator. Pointee == Element {
66
68
Original file line number Diff line number Diff line change @@ -126,7 +126,9 @@ extension CxxSequence {
126
126
/// Returns an iterator over the elements of this C++ container.
127
127
///
128
128
/// - Complexity: O(*n*), where *n* is the number of elements in the C++
129
- /// container.
129
+ /// container when each element is copied in O(1). Note that this might not
130
+ /// be true for certain C++ types, e.g. those with a custom copy
131
+ /// constructor that performs additional logic.
130
132
@inlinable
131
133
public func makeIterator( ) -> CxxIterator < Self > {
132
134
return CxxIterator ( sequence: self )
You can’t perform that action at this time.
0 commit comments