Files
cppdraft_translate/cppdraft/spanstream/general.md
2025-10-25 03:02:53 +03:00

22 lines
1.4 KiB
Markdown
Raw 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.

[spanstream.general]
# 31 Input/output library [[input.output]](./#input.output)
## 31.9 Span-based streams [[span.streams]](span.streams#spanstream.general)
### 31.9.6 Class template basic_spanstream [[spanstream]](spanstream#general)
#### 31.9.6.1 General [spanstream.general]
[🔗](#lib:basic_spanstream)
namespace std {template<class charT, class traits = char_traits<charT>>class basic_spanstream : public basic_iostream<charT, traits> {public:using char_type = charT; using int_type = typename traits::int_type; using pos_type = typename traits::pos_type; using off_type = typename traits::off_type; using traits_type = traits; // [[spanstream.cons]](spanstream.cons "31.9.6.2Constructors"), constructorsexplicit basic_spanstream(std::span<charT> s,
ios_base::openmode which = ios_base::out | ios_base::in);
basic_spanstream(const basic_spanstream&) = delete;
basic_spanstream(basic_spanstream&& rhs);
basic_spanstream& operator=(const basic_spanstream&) = delete;
basic_spanstream& operator=(basic_spanstream&& rhs); // [[spanstream.swap]](spanstream.swap "31.9.6.3Swap"), swapvoid swap(basic_spanstream& rhs); // [[spanstream.members]](spanstream.members "31.9.6.4Member functions"), members basic_spanbuf<charT, traits>* rdbuf() const noexcept;
std::span<charT> span() const noexcept; void span(std::span<charT> s) noexcept; private: basic_spanbuf<charT, traits> *sb*; // *exposition only*};}