mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
Closes #1319
This commit is contained in:
parent
cbbe6071ce
commit
fb1d4c9189
|
@ -2888,10 +2888,10 @@ If you need the notion of an optional value, use a pointer, `std::optional`, or
|
||||||
|
|
||||||
##### Enforcement
|
##### Enforcement
|
||||||
|
|
||||||
* (Simple) ((Foundation)) Warn when a parameter being passed by value has a size greater than `4 * sizeof(int)`.
|
* (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.
|
Suggest using a reference to `const` instead.
|
||||||
* (Simple) ((Foundation)) Warn when a `const` parameter being passed by reference has a size less than `3 * sizeof(int)`. Suggest passing by value 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 `const` parameter being passed by reference is `move`d.
|
* (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`
|
### <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