29 Input/output library [input.output]

29.6 Stream buffers [stream.buffers]

29.6.3 Class template basic_­streambuf [streambuf]

29.6.3.2 Public member functions [streambuf.members]

29.6.3.2.4 Putback [streambuf.pub.pback]

int_type sputbackc(char_type c);
Effects: If the input sequence putback position is not available, or if traits​::​eq(c, gptr()[-1]) is false, returns pbackfail(traits​::​to_­int_­type(c)).
Otherwise, decrements the next pointer for the input sequence and returns traits​::​to_­int_­type(*gptr()).
int_type sungetc();
Effects: If the input sequence putback position is not available, returns pbackfail().
Otherwise, decrements the next pointer for the input sequence and returns traits​::​to_­int_­type(*gptr()).