boostorg / move

Boost.org move module
http://boost.org/libs/move
Boost Software License 1.0
19 stars 55 forks source link

(void) C-cast is a non-portable way of suppressing compiler warnings #30

Closed fearsomepirate closed 3 years ago

fearsomepirate commented 4 years ago

in move/algo/detail/merge.cpp, lines 683 and 720, it looks like a (void) C-style cast is being used to suppress unused variable warnings in the compiler. This is not part of the standards and doesn't work for EDG-based compilers like Intel (doesn't work as of at least Intel 18.0), which renders some things unusable if you're using Intel and have compiler warnings handled as errors.

https://herbsutter.com/2009/10/18/mailbag-shutting-up-compiler-warnings/#comment-1509

boost::ignore_unused provides this functionality in a portable way. See boost/core/ignore_unused.hpp.

igaztanaga commented 3 years ago

Many thanks for the report and sorry for the long time to fix it.