mirror of
https://github.com/AnthonyCalandra/modern-cpp-features.git
synced 2025-12-16 17:47:02 +03:00
Synchronized buffered outputstreams.
This commit is contained in:
7
CPP20.md
7
CPP20.md
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user