[SERVER-67709] eliminate `visit_helper` namespace Created: 30/Jun/22 Updated: 29/Oct/23 Resolved: 06/Jul/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.1.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 | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | Service Arch 2022-07-11 | ||||||||
| Participants: | |||||||||
| Description |
|
The util/visit_helper.h defines a useful `Overloaded` struct for use with `std::visit` or `stdx::visit` of a variant. https://github.com/10gen/mongo/blame/master/src/mongo/util/visit_helper.h#L33 We should eliminate the "helper" from its name and not give it a private namespace containing only a single function. There's no technical reason to give it its own namespace. It seems to be just more typing. As it's in util/ it's a kind of precedent setter so I would like to take the namespace out of the picture as we don't do this for other util/ offerings typically. |
| Comments |
| Comment by Githook User [ 06/Jul/22 ] |
|
Author: {'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}Message: |
| Comment by Githook User [ 06/Jul/22 ] |
|
Author: {'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}Message: |
| Comment by Billy Donahue [ 30/Jun/22 ] |
|
Trivial rename |
| Comment by Billy Donahue [ 30/Jun/22 ] |
|
It also has no test. Adding one. |