-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[cxx-interop] NFC: Improve documentation comments #62869
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…rator` Clarify that calling `makeIterator` on a C++ sequence has `O(n)` complexity.
@swift-ci please smoke test |
/// array. | ||
/// | ||
/// - Complexity: O(*n*), where *n* is the number of elements in the C++ | ||
/// collection. | ||
/// container. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if we should add a note (for all these APIs) saying "Note that copying each element of the array may not take constant time, if the type of the element is defined in C++".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's reasonable, I added a note about that, thanks.
/// | ||
/// This initializer copies each element of the C++ collection to a new Swift | ||
/// This initializer copies each element of the C++ container to a new Swift | ||
/// array. | ||
/// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment "This initializer copies each element of the C++ container to a new Swift array." might be misinterpreted to mean the init is creating a new Swift Array internally. You could instead say "Initializes the array (or self) by copying every element of the C++ container".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
Hey, I am new to this, but I want to learn and work to fix. Can I get a explanation of what to do? |
@swift-ci please smoke test |
bddedda
to
2ac5ccf
Compare
@swift-ci please smoke test |
No description provided.