Answers for "c++ nodiscard"

C++
1

c++ nodiscard

C++17
The [[nodiscard]] attribute can be used to indicate that the return value of a function shouldn't be ignored when you do a function call.
If the return value is ignored, the compiler should give a warning on this.
Posted by: Guest on March-14-2022

Browse Popular Code Answers by Language