-
Notifications
You must be signed in to change notification settings - Fork 4.3k
[Term Entry] C++ Unordered-sets: swap() #8095
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull request overview
This PR adds comprehensive documentation for the swap() method used with C++ unordered sets, providing both member and non-member function usage patterns.
Key Changes:
- Documents both member function and non-member function syntax for swapping unordered sets
- Includes two complete code examples demonstrating swap functionality with integer and string unordered sets
- Explains constant-time complexity and iterator validity behavior after swapping
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Updated wording for clarity and consistency in the swap method documentation.
mamtawardhani
left a comment
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.
The PR looks good for a second review! 🚀
Co-authored-by: Copilot <[email protected]>
Updated the wording in the documentation for clarity.
Description
[Term Entry] C++ Unordered-sets: swap()
Issue Solved
Closes #8045
Type of Change
Checklist
mainbranch.Issues Solvedsection.