Third standard attribute

This section delves into the details of the third standard attribute called nodiscard.

The third standard attribute we get in C++17 is:

[[nodiscard]] attribute

[[nodiscard]] can be applied on a function or a type declaration to mark the importance of the returned value:

Get hands-on with 1200+ tech skills courses.