Add an Enforcement rule for prefix inc/dec functions. Try to phrase it
to reduce noisiness.
This commit is contained in:
hsutter
2019-02-14 11:13:42 -08:00
parent f7ef39f0d6
commit 684635eecd

View File

@@ -1069,6 +1069,9 @@ After that, we can look at waste related to algorithms and requirements, but tha
Many more specific rules aim at the overall goals of simplicity and elimination of gratuitous waste. Many more specific rules aim at the overall goals of simplicity and elimination of gratuitous waste.
* Flag an unused return value from a user-defined non-defaulted postfix `operator++` or `operator--` function. Prefer using the prefix form instead. (Note: "User-defined non-defaulted" is intended to reduce noise. Review this enforcement if it's still too noisy in practice.)
### <a name="Rp-mutable"></a>P.10: Prefer immutable data to mutable data ### <a name="Rp-mutable"></a>P.10: Prefer immutable data to mutable data
##### Reason ##### Reason