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

29 lines
1.0 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.

[span.streams.overview]
# 31 Input/output library [[input.output]](./#input.output)
## 31.9 Span-based streams [[span.streams]](span.streams#overview)
### 31.9.1 Overview [span.streams.overview]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L10001)
The header <spanstream> defines class templates and types
that associate stream buffers with objects whose types are
specializations of span as described in [[views.span]](views.span "23.7.2.2Class template span")[.](#1.sentence-1)
[*Note [1](#note-1)*:
A user of these classes is responsible for ensuring
that the character sequence represented by the given span outlives the use of the sequence by objects of the classes in [[span.streams]](span.streams "31.9Span-based streams")[.](#1.sentence-2)
Using multiple basic_spanbuf objects
referring to overlapping underlying sequences from different threads,
where at least one basic_spanbuf object is used
for writing to the sequence,
results in a data race[.](#1.sentence-3)
— *end note*]