We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
consteval
It emits an expression result unused warning instead. GCC emits the nodiscard warning.
expression result unused
nodiscard
[[nodiscard]] consteval int foo(){ return 1; } [[nodiscard]] int foo2(){ return 1; } int main(){ foo(); // <-- emits an expression result unused warning foo2(); }
See: https://godbolt.org/z/9fEG8c5Mx