Introduction

The [[nodiscard]] attribute is a way of conveying our intentions to the compiler. We'll find out more in this section.

We'll cover the following...

C++17 brought a few more standard attributes. By using those extra annotations, you can make your code not only readable for other developers, but also the compiler can use this knowledge.

For example, it might produce more warnings about potential mistakes.

Or the opposite: it might avoid a warning generation because it will notice a proper intention (for example with ...