[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:
Related
is related to SERVER-45763 Optimize extractKeyFast() fallback path Closed
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: SERVER-67709 rename visit_helper
Branch: master
https://github.com/mongodb/mongo/commit/501b2dc980abcc8090cff1998141af30b42d8dd1

Comment by Githook User [ 06/Jul/22 ]

Author:

{'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}

Message: SERVER-67709 visit_helper renamed
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/2ebbc1fb52c1d8633fee2f78d149db7da8c57dc5

Comment by Billy Donahue [ 30/Jun/22 ]

Trivial rename
Probably some churn from clang-format

Comment by Billy Donahue [ 30/Jun/22 ]

It also has no test. Adding one.

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