[SERVER-73921] Define NamespaceString and DatabaseName operators in-class Created: 13/Feb/23 Updated: 29/Oct/23 Resolved: 18/Feb/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.0.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Billy Donahue | Assignee: | Billy Donahue |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Service Arch 2023-02-20 |
| Participants: |
| Description |
|
This takes the functions out of the enclosing namespace. This idiomatic pattern reduces risk of ambiguity, and makes all uses of these operators in namespace mongo slightly easier to compile. Implement the relational operators as operators on std::tie tuples of the data members, so there's less overall work to do in the comparisons, and the body of each one becomes an obvious 1-liner. |
| Comments |
| Comment by Githook User [ 13/Feb/23 ] |
|
Author: {'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}Message: |