What is the recommended (standard) way of handling invalid input in extraction operator:
std::istream& operator>>(std::istream& is, SomeType& val) {
// ...
return is;
}
Should it set std::ios_base::failbit and return immediately? Is it okay to leave the val object in undefined state, with possibly some of it's variables already changed?