[SERVER-60787] Replace WithAlignment inheritance with std::aligned_storage Created: 18/Oct/21 Updated: 29/Oct/23 Resolved: 22/Oct/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.2.0 |
| Type: | Bug | 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 | ||||||||
| Operating System: | ALL | ||||||||
| Sprint: | Service Arch 2021-11-01 | ||||||||
| Participants: | |||||||||
| Story Points: | 1 | ||||||||
| Description |
|
WithAlignment<T> is an unnecessary and confusing feature of util that we can get rid of. It has T as a base class, which means it can't be used with arrays, primitive types, or final classes, and its constructor overload set is imperfect, and can't do aggregate initialization. We can easily replace the 2 users of this thing with std::aligned_storage instead. |
| Comments |
| Comment by Githook User [ 22/Oct/21 ] |
|
Author: {'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}Message: |
| Comment by Billy Donahue [ 18/Oct/21 ] |
|
(came up in Code Review for |