Skip to content

Glossary: C++ Beyond the Basics

Attribute

Also written: attributes, [[nodiscard]], nodiscard

A note to the compiler written in double square brackets. `[[nodiscard]]` makes the compiler warn if a caller ignores the function's return value.

Where the book teaches it

Related terms

std::optional