mirror of
https://github.com/AnthonyCalandra/modern-cpp-features.git
synced 2025-12-19 02:54:36 +03:00
Acknowledge those who add new language/library content.
This commit is contained in:
@@ -404,7 +404,7 @@ Because it is now possible to _move_ (or _forward_) values into a lambda that co
|
|||||||
```c++
|
```c++
|
||||||
auto p = std::make_unique<int>(1);
|
auto p = std::make_unique<int>(1);
|
||||||
|
|
||||||
auto task1 = [=] {*p = 5; }; // ERROR: std::unique_ptr cannot be copied
|
auto task1 = [=] { *p = 5; }; // ERROR: std::unique_ptr cannot be copied
|
||||||
// vs.
|
// vs.
|
||||||
auto task2 = [p = std::move(p)] { *p = 5; }; // OK: p is move-constructed into the closure object
|
auto task2 = [p = std::move(p)] { *p = 5; }; // OK: p is move-constructed into the closure object
|
||||||
// the original p is empty after task2 is created
|
// the original p is empty after task2 is created
|
||||||
@@ -1031,5 +1031,10 @@ C++11 introduces a memory model for C++, which means library support for threadi
|
|||||||
## Author
|
## Author
|
||||||
Anthony Calandra
|
Anthony Calandra
|
||||||
|
|
||||||
|
## Content Contributors
|
||||||
|
Those who have added new content will be listed here in no particular order.
|
||||||
|
* [thukydides](https://github.com/thukydides) - mentioned binary digit separators.
|
||||||
|
* [mknejp](https://github.com/mknejp) - lambda capture initializers and `mutable` keyword.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
MIT
|
MIT
|
||||||
|
|||||||
Reference in New Issue
Block a user