Skip to content

Commit c72f279

Browse files
authored
Proofreading and fix of the link (AnthonyCalandra#103)
1 parent 39f2281 commit c72f279

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ I'm not very picky about how you should contribute, but I ask that the following
1111
example of its usage. An optimal submission would also include a short real-world use case for the feature.
1212
* Make sure the feature is in the correct C++ version.
1313
* Make sure you've added the feature to the table of contents.
14-
* Make sure you have also added the feature to the separate major C++ readme files (ie. CPP11.md, CPP14.md, etc.).
14+
* Make sure you have also added the feature to the separate major C++ readme files (i.e. CPP11.md, CPP14.md, etc.).
1515
* Keep additions/deletions of content consistent with the cheatsheet's goals.
1616

1717
## Goals

CPP11.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ static_assert(std::is_same<std::conditional<true, int, double>::type, int>::valu
805805
### Smart pointers
806806
C++11 introduces new smart pointers: `std::unique_ptr`, `std::shared_ptr`, `std::weak_ptr`. `std::auto_ptr` now becomes deprecated and then eventually removed in C++17.
807807

808-
`std::unique_ptr` is a non-copyable, movable pointer that manages its own heap-allocated memory. **Note: Prefer using the `std::make_X` helper functions as opposed to using constructors. See the sections for [std::make_unique](#stdmake_unique) and [std::make_shared](#stdmake_shared).**
808+
`std::unique_ptr` is a non-copyable, movable pointer that manages its own heap-allocated memory. **Note: Prefer using the `std::make_X` helper functions as opposed to using constructors. See the sections for [std::make_unique](https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP14.md#stdmake_unique) and [std::make_shared](#stdmake_shared).**
809809
```c++
810810
std::unique_ptr<Foo> p1 { new Foo{} }; // `p1` owns `Foo`
811811
if (p1) {
@@ -952,7 +952,7 @@ auto result = handle.get(); // wait for the result
952952
```
953953

954954
### std::begin/end
955-
`std::begin` and `std::end` free functions were added to return begin and end iterators of a container generically. These functions also work with raw arrays which do not have begin and end member functions.
955+
`std::begin` and `std::end` free functions were added to return begin and end iterators of a container generically. These functions also work with raw arrays which do not have `begin` and `end` member functions.
956956

957957
```c++
958958
template <typename T>

CPP14.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ constexpr T e = T(2.7182818284590452353);
148148
```
149149

150150
### [[deprecated]] attribute
151-
C++14 introduces the `[[deprecated]]` attribute to indicate that a unit (function, class, etc) is discouraged and likely yield compilation warnings. If a reason is provided, it will be included in the warnings.
151+
C++14 introduces the `[[deprecated]]` attribute to indicate that a unit (function, class, etc.) is discouraged and likely yield compilation warnings. If a reason is provided, it will be included in the warnings.
152152
```c++
153153
[[deprecated]]
154154
void old_method();

CPP20.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ auto g = []<my_concept auto v> () {
153153
// ...
154154
};
155155
```
156-
The `requires` keyword is used either to start a requires clause or a requires expression:
156+
The `requires` keyword is used either to start a `requires` clause or a `requires` expression:
157157
```c++
158158
template <typename T>
159159
requires my_concept<T> // `requires` clause.
@@ -168,7 +168,7 @@ T add(T a, T b) {
168168
return a + b;
169169
}
170170
```
171-
Note that the parameter list in a requires expression is optional. Each requirement in a requires expression are one of the following:
171+
Note that the parameter list in a `requires` expression is optional. Each requirement in a `requires` expression are one of the following:
172172

173173
* **Simple requirements** - asserts that the given expression is valid.
174174

@@ -297,7 +297,7 @@ while (unlikely_truthy_condition) [[unlikely]] {
297297
```
298298

299299
### Deprecate implicit capture of this
300-
Implicitly capturing `this` in a lamdba capture using `[=]` is now deprecated; prefer capturing explicitly using `[=, this]` or `[=, *this]`.
300+
Implicitly capturing `this` in a lambda capture using `[=]` is now deprecated; prefer capturing explicitly using `[=, this]` or `[=, *this]`.
301301
```c++
302302
struct int_value {
303303
int n = 0;

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ auto g = []<my_concept auto v> () {
248248
// ...
249249
};
250250
```
251-
The `requires` keyword is used either to start a requires clause or a requires expression:
251+
The `requires` keyword is used either to start a `requires` clause or a `requires` expression:
252252
```c++
253253
template <typename T>
254254
requires my_concept<T> // `requires` clause.
@@ -263,7 +263,7 @@ T add(T a, T b) {
263263
return a + b;
264264
}
265265
```
266-
Note that the parameter list in a requires expression is optional. Each requirement in a requires expression are one of the following:
266+
Note that the parameter list in a `requires` expression is optional. Each requirement in a `requires` expression are one of the following:
267267

268268
* **Simple requirements** - asserts that the given expression is valid.
269269

@@ -392,7 +392,7 @@ while (unlikely_truthy_condition) [[unlikely]] {
392392
```
393393

394394
### Deprecate implicit capture of this
395-
Implicitly capturing `this` in a lamdba capture using `[=]` is now deprecated; prefer capturing explicitly using `[=, this]` or `[=, *this]`.
395+
Implicitly capturing `this` in a lambda capture using `[=]` is now deprecated; prefer capturing explicitly using `[=, this]` or `[=, *this]`.
396396
```c++
397397
struct int_value {
398398
int n = 0;
@@ -1254,7 +1254,7 @@ constexpr T e = T(2.7182818284590452353);
12541254
```
12551255

12561256
### [[deprecated]] attribute
1257-
C++14 introduces the `[[deprecated]]` attribute to indicate that a unit (function, class, etc) is discouraged and likely yield compilation warnings. If a reason is provided, it will be included in the warnings.
1257+
C++14 introduces the `[[deprecated]]` attribute to indicate that a unit (function, class, etc.) is discouraged and likely yield compilation warnings. If a reason is provided, it will be included in the warnings.
12581258
```c++
12591259
[[deprecated]]
12601260
void old_method();
@@ -2205,7 +2205,7 @@ auto result = handle.get(); // wait for the result
22052205
```
22062206

22072207
### std::begin/end
2208-
`std::begin` and `std::end` free functions were added to return begin and end iterators of a container generically. These functions also work with raw arrays which do not have begin and end member functions.
2208+
`std::begin` and `std::end` free functions were added to return begin and end iterators of a container generically. These functions also work with raw arrays which do not have `begin` and `end` member functions.
22092209

22102210
```c++
22112211
template <typename T>

0 commit comments

Comments
 (0)