16 Apr
2022
16 Apr
'22
3:59 p.m.
On Sat, Apr 16, 2022 at 10:57 AM Vinnie Falco wrote:
Isn't it better to just write (void) x;
Doesn't always work. For example: https://godbolt.org/z/3zn11ErKG Compare to use of boost::ignore_used: https://godbolt.org/z/Maf4KcPeo See also Herb's comment: https://herbsutter.com/2009/10/18/mailbag-shutting-up-compiler-warnings/#com... For those rare users that can afford to target C++17 or higher, they have [[maybe_unused]] Glen Glen
instead of including a whole header file:
#include
just to write
boost::ignore_unused( x );
?
-- Regards, Vinnie
Follow me on GitHub: https://github.com/vinniefalco
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost