Files
2025-10-25 03:02:53 +03:00

42 lines
1.3 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[streambuf.pub.pback]
# 31 Input/output library [[input.output]](./#input.output)
## 31.6 Stream buffers [[stream.buffers]](stream.buffers#streambuf.pub.pback)
### 31.6.3 Class template basic_streambuf [[streambuf]](streambuf#pub.pback)
#### 31.6.3.3 Public member functions [[streambuf.members]](streambuf.members#streambuf.pub.pback)
#### 31.6.3.3.4 Putback [streambuf.pub.pback]
[🔗](#lib:sputbackc,basic_streambuf)
`int_type sputbackc(char_type c);
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L3358)
*Effects*: If the input sequence putback position is not available, or
iftraits::eq(c, gptr()[-1]) is false, returnspbackfail(traits::to_int_type(c))[.](#1.sentence-1)
Otherwise, decrements the next pointer for the input sequence and
returnstraits::to_int_type(*gptr())[.](#1.sentence-2)
[🔗](#lib:sungetc,basic_streambuf)
`int_type sungetc();
`
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L3376)
*Effects*: If the input sequence putback position is not available,
returnspbackfail()[.](#2.sentence-1)
Otherwise, decrements the next pointer for the input sequence and
returnstraits::to_int_type(*gptr())[.](#2.sentence-2)