I was running the example code on std::istream::sentry page and I didn't understand why std::isspace on line 17 doesn’t get out of the loop, since on the line 24 the string buffer starts with white space (" (555)2326").
The constructor of the sentry object skips initial whitespace unless the skipws flag is unset.
Try putting a space between the digits somewhere and it'll stop there.
You can unset the skipws flag like this:
1 2 3
parseme >> std::noskipws;
// or
parseme.unsetf(parseme.skipws);