[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: SERVER-73921 Define NamespaceString and DatabaseName operators in class
Branch: master
https://github.com/mongodb/mongo/commit/f76c8220112808cd58e8947b270a3e9d03a11c3b

Generated at Thu Feb 08 06:26:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.