Init
This commit is contained in:
45
cppdraft/output/iterators.md
Normal file
45
cppdraft/output/iterators.md
Normal file
@@ -0,0 +1,45 @@
|
||||
[output.iterators]
|
||||
|
||||
# 24 Iterators library [[iterators]](./#iterators)
|
||||
|
||||
## 24.3 Iterator requirements [[iterator.requirements]](iterator.requirements#output.iterators)
|
||||
|
||||
### 24.3.5 C++17 iterator requirements [[iterator.cpp17]](iterator.cpp17#output.iterators)
|
||||
|
||||
#### 24.3.5.4 Output iterators [output.iterators]
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iterators.tex#L2174)
|
||||
|
||||
A class or pointer typeX meets the requirements of an output iterator
|
||||
if X meets the *Cpp17Iterator* requirements ([[iterator.iterators]](iterator.iterators "24.3.5.2 Cpp17Iterator"))
|
||||
and the expressions in Table [80](#tab:outputiterator "Table 80: Cpp17OutputIterator requirements (in addition to Cpp17Iterator)") are valid and have the indicated semantics[.](#1.sentence-1)
|
||||
|
||||
Table [80](#tab:outputiterator) — *Cpp17OutputIterator* requirements (in addition to *Cpp17Iterator*) [[tab:outputiterator]](./tab:outputiterator)
|
||||
|
||||
| [ð](#tab:outputiterator-row-1)<br>**Expression** | **Return type** | **Operational** | **Assertion/note** |
|
||||
| --- | --- | --- | --- |
|
||||
| [ð](#tab:outputiterator-row-2) | | **semantics** | **pre-/post-condition** |
|
||||
| [ð](#tab:outputiterator-row-3)<br>*r = o | result is not used | | *Remarks*: After this operation r is not required to be dereferenceable[.](#tab:outputiterator-row-3-column-4-sentence-1)<br> *Postconditions*: r is incrementable[.](#tab:outputiterator-row-3-column-4-sentence-2) |
|
||||
| [ð](#tab:outputiterator-row-4)<br>++r | X& | | addressof(r) == addressof(++r)[.](#tab:outputiterator-row-4-column-4-sentence-1)<br> *Remarks*: After this operation r is not required to be dereferenceable[.](#tab:outputiterator-row-4-column-4-sentence-2)<br> *Postconditions*: r is incrementable[.](#tab:outputiterator-row-4-column-4-sentence-3) |
|
||||
| [ð](#tab:outputiterator-row-5)<br>r++ | convertible to const X& | { X tmp = r; ++r; return tmp; } | *Remarks*: After this operation r is not required to be dereferenceable[.](#tab:outputiterator-row-5-column-4-sentence-1)<br> *Postconditions*: r is incrementable[.](#tab:outputiterator-row-5-column-4-sentence-2) |
|
||||
| [ð](#tab:outputiterator-row-6)<br>*r++ = o | result is not used | | *Remarks*: After this operation r is not required to be dereferenceable[.](#tab:outputiterator-row-6-column-4-sentence-1)<br> *Postconditions*: r is incrementable[.](#tab:outputiterator-row-6-column-4-sentence-2) |
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iterators.tex#L2216)
|
||||
|
||||
*Recommended practice*: The implementation of an algorithm on output iterators
|
||||
should never attempt to pass through the same iterator twice;
|
||||
such an algorithm should be a single-pass algorithm[.](#2.sentence-1)
|
||||
|
||||
[*Note [1](#note-1)*:
|
||||
|
||||
The only valid use of an operator* is on the left side of the assignment statement[.](#2.sentence-2)
|
||||
|
||||
Assignment through the same value of the iterator happens only once[.](#2.sentence-3)
|
||||
|
||||
Equality and inequality are not necessarily defined[.](#2.sentence-4)
|
||||
|
||||
â *end note*]
|
||||
1097
cppdraft/output/streams.md
Normal file
1097
cppdraft/output/streams.md
Normal file
File diff suppressed because it is too large
Load Diff
17
cppdraft/output/streams/general.md
Normal file
17
cppdraft/output/streams/general.md
Normal file
@@ -0,0 +1,17 @@
|
||||
[output.streams.general]
|
||||
|
||||
# 31 Input/output library [[input.output]](./#input.output)
|
||||
|
||||
## 31.7 Formatting and manipulators [[iostream.format]](iostream.format#output.streams.general)
|
||||
|
||||
### 31.7.6 Output streams [[output.streams]](output.streams#general)
|
||||
|
||||
#### 31.7.6.1 General [output.streams.general]
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L5912)
|
||||
|
||||
The header [<ostream>](ostream.syn#header:%3costream%3e "31.7.2 Header <ostream> synopsis [ostream.syn]") defines a class template
|
||||
and several function templates that control output to a stream buffer,
|
||||
along with a function template that inserts into stream rvalues[.](#1.sentence-1)
|
||||
Reference in New Issue
Block a user