Summary
This episode covers C++17's new [[nodiscard]] attribute, which addresses a common criticism of return-value error codes by ensuring developers don't ignore important return values. Jason demonstrates how this attribute can be applied not only to functions but also to entire types like structs, enums, classes, and unions. When a [[nodiscard]] function's return value is ignored, the compiler issues a warning, forcing developers to explicitly handle the result. This provides some of the safety benefits of exceptions while potentially maintaining the performance advantages of error codes.