Open
Description
F.16 says:
(Simple) ((Foundation)) Warn when a parameter being passed by value has a size greater than 2 * sizeof(void*). Suggest using a reference to const instead.
(Simple) ((Foundation)) Warn when a parameter passed by reference to const has a size less or equal than 2 * sizeof(void*). Suggest passing by value instead.
Two problems that have come up with this advice:
- (easy) It should also say "and is trivially copyable"
- (harder) When the parameter is of an incomplete user-defined type (class, enum, union) then we can't tell its size and trivial copyability
Metadata
Metadata
Assignees
Labels
No labels