...
Using a predicate function object that contains state can produce unexpected values.
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
CTR58-CPP | Low | Likely | High | P3 | L3 |
Automated Detection
Tool | Version | Checker | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
Parasoft C/C++test |
| CERT_CPP-CTR58-a | Make predicates const pure functions | ||||||
PRQA QA-C++ |
| 3225, 3226, 3227, 3228, 3229, 3230, 3231, 3232, 3233, 3234 |
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
Bibliography
[ISO/IEC 14882-2014] | Subclause 25.1, "General" |
[Meyers 2001] | Item 39, "Make Predicates Pure Functions" |
...
...