...
- as an argument to non-member functions
swap(),operator>>(), andgetline() - as an argument to
basic_string::swap() - calling
data()andc_str()member functions calling non-const member functions, except {{Wiki Markup operator\[\]()}}, {{at()}}, {{begin()}}, {{rbegin()}}, {{end()}}, and {{rend()}}unmigrated-wiki-markup- subsequent to any of the above uses except the forms of {{
insert()}} and {{erase()}} that return iterators, the first call to non-const member functions {{operator\[\]()}}, {{at()}}, {{begin()}}, {{rbegin()}}, {{end()}}, or {{rend()}}
Non-Compliant Code Example
...
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
|---|---|---|---|---|---|
STR38-CPP | high | probable | high | P6 | L2 |
Bibliography
...
\[[Meyers 01|AA. Bibliography#Meyers 01]\] Item 43: Prefer algorithm calls to hand-written loops.
\
[[ISO/IEC 14882-2003|AA. Bibliography#ISO/IEC 14882-2003]\] 21.3 Class template basic_string.
...
STR37-CPP. Arguments to character handling functions must be representable as an unsigned char 07. Characters and Strings (STR) STR39-CPP. Range check element access