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
Comments are closed.