Proofreading and fix of the link (#103)

This commit is contained in:
Dmitry Tsarevich
2021-09-30 01:51:54 +03:00
committed by GitHub
parent 39f2281bbf
commit c72f2796c0
5 changed files with 12 additions and 12 deletions

View File

@@ -153,7 +153,7 @@ auto g = []<my_concept auto v> () {
// ...
};
```
The `requires` keyword is used either to start a requires clause or a requires expression:
The `requires` keyword is used either to start a `requires` clause or a `requires` expression:
```c++
template <typename T>
requires my_concept<T> // `requires` clause.
@@ -168,7 +168,7 @@ T add(T a, T b) {
return a + b;
}
```
Note that the parameter list in a requires expression is optional. Each requirement in a requires expression are one of the following:
Note that the parameter list in a `requires` expression is optional. Each requirement in a `requires` expression are one of the following:
* **Simple requirements** - asserts that the given expression is valid.
@@ -297,7 +297,7 @@ while (unlikely_truthy_condition) [[unlikely]] {
```
### Deprecate implicit capture of this
Implicitly capturing `this` in a lamdba capture using `[=]` is now deprecated; prefer capturing explicitly using `[=, this]` or `[=, *this]`.
Implicitly capturing `this` in a lambda capture using `[=]` is now deprecated; prefer capturing explicitly using `[=, this]` or `[=, *this]`.
```c++
struct int_value {
int n = 0;