tmp/tmpvxotnxqk/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Assignment and swap <a id="syncstream.syncbuf.assign">[[syncstream.syncbuf.assign]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
basic_syncbuf& operator=(basic_syncbuf&& rhs) noexcept;
|
| 5 |
+
```
|
| 6 |
+
|
| 7 |
+
*Effects:* Calls `emit()` then move assigns from `rhs`. After the move
|
| 8 |
+
assignment `*this` has the observable state it would have had if it had
|
| 9 |
+
been move constructed from `rhs` [[syncstream.syncbuf.cons]].
|
| 10 |
+
|
| 11 |
+
*Returns:* `*this`.
|
| 12 |
+
|
| 13 |
+
*Ensures:*
|
| 14 |
+
|
| 15 |
+
- `rhs.get_wrapped() == nullptr` is `true`.
|
| 16 |
+
- `this->get_allocator() == rhs.get_allocator()` is `true` when
|
| 17 |
+
``` cpp
|
| 18 |
+
allocator_traits<Allocator>::propagate_on_container_move_assignment::value
|
| 19 |
+
```
|
| 20 |
+
|
| 21 |
+
is `true`; otherwise, the allocator is unchanged.
|
| 22 |
+
|
| 23 |
+
*Remarks:* This assignment operator disassociates `rhs` from its wrapped
|
| 24 |
+
stream buffer, ensuring destruction of `rhs` produces no output.
|
| 25 |
+
|
| 26 |
+
``` cpp
|
| 27 |
+
void swap(basic_syncbuf& other) noexcept;
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
+
*Preconditions:* Either
|
| 31 |
+
`allocator_traits<Allocator>::propagate_on_container_swap::value` is
|
| 32 |
+
`true` or `this->get_allocator() == other.get_allocator()` is `true`.
|
| 33 |
+
|
| 34 |
+
*Effects:* Exchanges the state of `*this` and `other`.
|
| 35 |
+
|