Closed
Description
Affected rules
M5-3-1
A5-0-2
cpp/autosar/non-boolean-if-condition
cpp/autosar/non-boolean-iteration-condition
Description
Iteration or if statements of type bool
within uninstantiated templates have an unknown
type and raise a false positive.
Example
template<T>
void foo(std::vector<T> & v) {
for (typename std::vector<T>::iterator it{v.begin()}; it != v.end(); ++it) {
(*it)++;
}
}