Minor cosmetic changes: make attribute headers consistent; remove extra spacing in TOC.

This commit is contained in:
Anthony Calandra
2023-02-17 23:06:23 -05:00
parent 6ba2efe088
commit 698ac6d5ff
3 changed files with 8 additions and 13 deletions

View File

@@ -17,7 +17,7 @@ C++17 includes the following new language features:
- [constexpr if](#constexpr-if)
- [utf-8 character literals](#utf-8-character-literals)
- [direct-list-initialization of enums](#direct-list-initialization-of-enums)
- [fallthrough, nodiscard, maybe_unused attributes](#fallthrough-nodiscard-maybe_unused-attributes)
- [\[\[fallthrough\]\], \[\[nodiscard\]\], \[\[maybe_unused\]\] attributes](#fallthrough-nodiscard-maybe_unused-attributes)
- [\_\_has\_include](#\_\_has\_include)
C++17 includes the following new library features:
@@ -265,7 +265,7 @@ byte d = byte{1}; // OK
byte e = byte{256}; // ERROR
```
### fallthrough, nodiscard, maybe_unused attributes
### \[\[fallthrough\]\], \[\[nodiscard\]\], \[\[maybe_unused\]\] attributes
C++17 introduces three new attributes: `[[fallthrough]]`, `[[nodiscard]]` and `[[maybe_unused]]`.
* `[[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.
```c++