mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
Clarify F.16 enforcement rule about passing by value (#2008)
This commit is contained in:
parent
fb112c7281
commit
ee8d9ab216
|
@ -3026,7 +3026,7 @@ If you need the notion of an optional value, use a pointer, `std::optional`, or
|
|||
|
||||
* (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 than `2 * sizeof(void*)`. Suggest passing by value 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.
|
||||
* (Simple) ((Foundation)) Warn when a parameter passed by reference to `const` is `move`d.
|
||||
|
||||
### <a name="Rf-inout"></a>F.17: For "in-out" parameters, pass by reference to non-`const`
|
||||
|
|
Loading…
Reference in New Issue
Block a user