[SERVER-79134] Add MONGO_NO_UNIQUE_ADDRESS macro Created: 19/Jul/23  Updated: 26/Jul/23  Resolved: 26/Jul/23

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

Type: Improvement Priority: Major - P3
Reporter: Billy Donahue Assignee: Blake Oler
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-75523 Create clang-tidy rule banning use of... Closed
Duplicate
duplicates SERVER-75523 Create clang-tidy rule banning use of... Closed
Assigned Teams:
Service Arch
Sprint: Service Arch 2023-08-07
Participants:

 Description   

We can't use [[no_unique_address]] attribute directly in our code because we need to support MSVC builds.

https://devblogs.microsoft.com/cppblog/msvc-cpp20-and-the-std-cpp20-switch/#c20-no_unique_address

MSVC spells this attribute differently for compatibility reasons. In our codebase, we need a macro use instead of using the attribute directly.


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