Tag: nodiscard
3 posts
-
C++ [[nodiscard]] Guide: Ignore Return Values Safely
Turn ignored return values into compiler warnings with [[nodiscard]]: error codes, RAII guards, factories, C++20 reason strings, and missing-warning cases.
-
C++ Attributes: nodiscard, deprecated, maybe_unused, likely, fallthrough and noreturn
What each standard C++ attribute actually does, the exact GCC warnings it triggers, and the traps: nodiscard gaps, misused likely, noreturn that returns.
-
C++ Clean Code Basics: Express Intent with const and noexcept
Use const correctness, noexcept, and [[nodiscard]] in C++ APIs so interfaces state what they guarantee.