[SERVER-34931] Forbid appending unsigned integral types to BSONObjBuilders Created: 10/May/18 Updated: 06/Dec/22 Resolved: 17/Feb/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Portability |
| Affects Version/s: | None |
| Fix Version/s: | 4.1 Desired |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Andrew Morrow (Inactive) | Assignee: | Backlog - Service Architecture |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Service Arch
|
||||||||
| Participants: | |||||||||
| Description |
|
The BSONObjBuilder has overloads that allow appending unsigned integral types (notably size_t). This doesn't have good semantics, since the underlying BSON specification doesn't offer unsigned types. We should remove these overloads, and require that only signed types be able to be directly appended. This will force call sites to make choices, as they probably should be doing. |