Synchronized buffered outputstreams.

This commit is contained in:
Anthony Calandra
2020-02-22 14:33:56 -05:00
parent 9168f05215
commit 585e5c8b69
2 changed files with 14 additions and 0 deletions

View File

@@ -19,6 +19,7 @@ C++20 includes the following new language features:
C++20 includes the following new library features:
- [concepts library](#concepts-library)
- [synchronized buffered outputstream](#synchronized-buffered-outputstream)
## C++20 Language Features
@@ -364,6 +365,12 @@ Concepts are also provided by the standard library for building more complicated
See also: [concepts](#concepts).
### synchronized buffered outputstream
Buffers output operations for the wrapped output stream ensuring synchronization (i.e. no interleaving of output).
```c++
std::osyncstream{std::cout} << "The value of x is:" << x << std::endl;
```
## Acknowledgements
* [cppreference](http://en.cppreference.com/w/cpp) - especially useful for finding examples and documentation of new library features.
* [C++ Rvalue References Explained](http://thbecker.net/articles/rvalue_references/section_01.html) - a great introduction I used to understand rvalue references, perfect forwarding, and move semantics.

View File

@@ -19,6 +19,7 @@ C++20 includes the following new language features:
C++20 includes the following new library features:
- [concepts library](#concepts-library)
- [synchronized buffered outputstream](#synchronized-buffered-outputstream)
C++17 includes the following new language features:
- [template argument deduction for class templates](#template-argument-deduction-for-class-templates)
@@ -456,6 +457,12 @@ Concepts are also provided by the standard library for building more complicated
See also: [concepts](#concepts).
### synchronized buffered outputstream
Buffers output operations for the wrapped output stream ensuring synchronization (i.e. no interleaving of output).
```c++
std::osyncstream{std::cout} << "The value of x is:" << x << std::endl;
```
## C++17 Language Features
### Template argument deduction for class templates