C++ 23 · Language basics

Warn when a result is ignored

Mark a function whose return value should be used.

[[nodiscard]] bool save(const std::string& path);

Official C++ 23 documentation

More language basics commands

All language basics commands · C++ 23 cheatsheet

Was this page helpful?