: base(str, which) {}
typename base::int_type
- overflow(typename base::int_type c = base::type_traits::eof())
+ overflow(typename base::int_type c = base::traits_type::eof())
{++overflow_called; return base::overflow(c);}
void pbump(int n) {base::pbump(n);}
int main()
{
+ { // sanity check
+ testbuf<char> tb("");;
+ tb.overflow();
+ }
{
testbuf<char> sb("abc");
assert(sb.sputc('1') == '1');
: base(str, which) {}
typename base::int_type
- pbackfail(typename base::int_type c = base::type_traits::eof())
+ pbackfail(typename base::int_type c = base::traits_type::eof())
{return base::pbackfail(c);}
void pbump(int n) {base::pbump(n);}
int main()
{
+ { // sanity check
+ testbuf<char> tb("");;
+ tb.pbackfail();
+ }
{
testbuf<char> sb("123", std::ios_base::in);
assert(sb.sgetc() == '1');