Enforcing code contracts with [[nodiscard]]

Save to:
Instapaper Pocket Readability

More details about a new C++17 attribute

Enforcing code contracts with [[nodiscard]]

by Bartlomiej Filipek

From the article:

[[nodiscard]] is an excellent addition to all the important code: public APIs, safety-critical systems, etc. Adding this attribute will at least enforce the code contract. The compiler will help you detect bugs - at compile time, rather than finding in in the runtime.

Add a Comment

You must sign in or register to add a comment.

Comments (0)

There are currently no comments on this entry.