Version 8.9.9 (build 56886) says: Pointer and reference parameters should be “const” if the corresponding object is not modified
It appears that SonarQube cannot tell that the non-const begin() and end() are being called on the parameter passed by non-const reference. Simple example (assume MyFileReader only provides non-const begin() and end() functions):
void foo(MyFileReader& input){
for(const auto line : input){}
}