C++ attributes
Table of contents
Brief
[[noreturn]]
[[carries_dependency]]
[[assume]]
[[nodiscard]]
Attribute [[nodiscard]]
auto lm = [] [[nodiscard]] () -> int { return 42; };
lm(); // would emit a warning
attributes.cpp:27:5: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
lm();
~~^~
## Output
```txt