replace `invariant` etc uses of boost/preprocessor (SERVER-81394)

[SERVER-81567] Replace all remaining boost/preprocessor usage Created: 29/Sep/23  Updated: 29/Oct/23  Resolved: 30/Sep/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.2.0-rc0

Type: Sub-task 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-10-02
Participants:

 Description   

Significant boost/preprocessor usage was removed in SERVER-81394.
This task is to remove the few stragglers that are also not needed.

  • boost/preprocessor/stringize.hpp is used to stringify preprocessor macro values in 2 places _LINE_ and MOZJS_MAJOR_VERSION. This is not really a good enough reason to keep the dependency on Boost.Preprocessor, however, as this can be done with simple code in both places.
  • We are also using boost/preprocessor and boost/vmd in platform/visibility.h for a generic system of MONGO_API pseudo-ifdefs that are only used by one library (mutable_bson). We don't really need a generic solution like that. A more boring ifdef/else/endif structure can be applied much more simply, especially since there is only one use case in practice. It's an extremely clever system but it's hard to understand it, brings in a vendored boost library, and it's not needed.


 Comments   
Comment by Githook User [ 30/Sep/23 ]

Author:

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

Message: SERVER-81567 replace remaining Boost.Preprocessor usage
Branch: master
https://github.com/mongodb/mongo/commit/30cf905d44c606c7642d459bbee0f7d927dbd47e

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