Closed
Description
Affected rules
M9-3-3
Description
Improve the rule to detect assignment into references or pointers into member data.
Example
In this example we see a member function which modifies a member variable called values_
, by iterating through and taking a reference to each element.
template <typename U = T>
void fill(const T& val) {
for (auto& elem : values_) {
elem = val;
}
}