Not always, but when the situation is somewhat like; you expect a single character y/n answer and get words like Yes, No, Nope ..and the program needs to use the input for other reasons after that.
numeric_limits can be used to determine the max or min size/range of type passed (and many other safety tricks !) in the <> brackets.
numeric_limits - C++ Reference
Then, the you can easily find out how it works, by examining the prototype of
istream::ignore - C++ Reference .