Skip to content

Commit 698ac6d

Browse files
Minor cosmetic changes: make attribute headers consistent; remove extra spacing in TOC.
1 parent 6ba2efe commit 698ac6d

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

CPP17.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ C++17 includes the following new language features:
1717
- [constexpr if](#constexpr-if)
1818
- [utf-8 character literals](#utf-8-character-literals)
1919
- [direct-list-initialization of enums](#direct-list-initialization-of-enums)
20-
- [fallthrough, nodiscard, maybe_unused attributes](#fallthrough-nodiscard-maybe_unused-attributes)
20+
- [\[\[fallthrough\]\], \[\[nodiscard\]\], \[\[maybe_unused\]\] attributes](#fallthrough-nodiscard-maybe_unused-attributes)
2121
- [\_\_has\_include](#\_\_has\_include)
2222

2323
C++17 includes the following new library features:
@@ -265,7 +265,7 @@ byte d = byte{1}; // OK
265265
byte e = byte{256}; // ERROR
266266
```
267267
268-
### fallthrough, nodiscard, maybe_unused attributes
268+
### \[\[fallthrough\]\], \[\[nodiscard\]\], \[\[maybe_unused\]\] attributes
269269
C++17 introduces three new attributes: `[[fallthrough]]`, `[[nodiscard]]` and `[[maybe_unused]]`.
270270
* `[[fallthrough]]` indicates to the compiler that falling through in a switch statement is intended behavior. This attribute may only be used in a switch statement, and must be placed before the next case/default label.
271271
```c++

CPP20.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ C++20 includes the following new language features:
99
- [designated initializers](#designated-initializers)
1010
- [template syntax for lambdas](#template-syntax-for-lambdas)
1111
- [range-based for loop with initializer](#range-based-for-loop-with-initializer)
12-
- [likely and unlikely attributes](#likely-and-unlikely-attributes)
12+
- [\[\[likely\]\] and \[\[unlikely\]\] attributes](#likely-and-unlikely-attributes)
1313
- [deprecate implicit capture of this](#deprecate-implicit-capture-of-this)
1414
- [class types in non-type template parameters](#class-types-in-non-type-template-parameters)
1515
- [constexpr virtual functions](#constexpr-virtual-functions)
@@ -265,7 +265,7 @@ for (auto v = std::vector{1, 2, 3}; auto& e : v) {
265265
// prints "123"
266266
```
267267

268-
### likely and unlikely attributes
268+
### \[\[likely\]\] and \[\[unlikely\]\] attributes
269269
Provides a hint to the optimizer that the labelled statement has a high probability of being executed.
270270
```c++
271271
switch (n) {

README.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22

33
## Overview
44

5-
65
C++20 includes the following new language features:
76
- [coroutines](#coroutines)
87
- [concepts](#concepts)
98
- [designated initializers](#designated-initializers)
109
- [template syntax for lambdas](#template-syntax-for-lambdas)
1110
- [range-based for loop with initializer](#range-based-for-loop-with-initializer)
12-
- [likely and unlikely attributes](#likely-and-unlikely-attributes)
11+
- [\[\[likely\]\] and \[\[unlikely\]\] attributes](#likely-and-unlikely-attributes)
1312
- [deprecate implicit capture of this](#deprecate-implicit-capture-of-this)
1413
- [class types in non-type template parameters](#class-types-in-non-type-template-parameters)
1514
- [constexpr virtual functions](#constexpr-virtual-functions)
@@ -34,7 +33,6 @@ C++20 includes the following new library features:
3433
- [std::midpoint](#stdmidpoint)
3534
- [std::to_array](#stdto_array)
3635

37-
3836
C++17 includes the following new language features:
3937
- [template argument deduction for class templates](#template-argument-deduction-for-class-templates)
4038
- [declaring non-type template parameters with auto](#declaring-non-type-template-parameters-with-auto)
@@ -49,7 +47,7 @@ C++17 includes the following new language features:
4947
- [constexpr if](#constexpr-if)
5048
- [utf-8 character literals](#utf-8-character-literals)
5149
- [direct-list-initialization of enums](#direct-list-initialization-of-enums)
52-
- [fallthrough, nodiscard, maybe_unused attributes](#fallthrough-nodiscard-maybe_unused-attributes)
50+
- [\[\[fallthrough\]\], \[\[nodiscard\]\], \[\[maybe_unused\]\] attributes](#fallthrough-nodiscard-maybe_unused-attributes)
5351
- [\_\_has\_include](#\_\_has\_include)
5452

5553
C++17 includes the following new library features:
@@ -80,7 +78,6 @@ C++14 includes the following new library features:
8078
- [compile-time integer sequences](#compile-time-integer-sequences)
8179
- [std::make_unique](#stdmake_unique)
8280

83-
8481
C++11 includes the following new language features:
8582
- [move semantics](#move-semantics)
8683
- [variadic templates](#variadic-templates)
@@ -133,8 +130,6 @@ C++11 includes the following new library features:
133130
- [std::async](#stdasync)
134131
- [std::begin/end](#stdbeginend)
135132

136-
137-
138133
## C++20 Language Features
139134

140135
### Coroutines
@@ -366,7 +361,7 @@ for (auto v = std::vector{1, 2, 3}; auto& e : v) {
366361
// prints "123"
367362
```
368363

369-
### likely and unlikely attributes
364+
### \[\[likely\]\] and \[\[unlikely\]\] attributes
370365
Provides a hint to the optimizer that the labelled statement has a high probability of being executed.
371366
```c++
372367
switch (n) {
@@ -934,7 +929,7 @@ byte d = byte{1}; // OK
934929
byte e = byte{256}; // ERROR
935930
```
936931
937-
### fallthrough, nodiscard, maybe_unused attributes
932+
### \[\[fallthrough\]\], \[\[nodiscard\]\], \[\[maybe_unused\]\] attributes
938933
C++17 introduces three new attributes: `[[fallthrough]]`, `[[nodiscard]]` and `[[maybe_unused]]`.
939934
* `[[fallthrough]]` indicates to the compiler that falling through in a switch statement is intended behavior. This attribute may only be used in a switch statement, and must be placed before the next case/default label.
940935
```c++

0 commit comments

Comments
 (0)