basic_streambuf::snextc

int_type snextc();

The member function calls sbumpc() and, if that function returns T::eof(), returns T::eof(). Otherwise, it returns sgetc().