Boost logo

Boost :

Subject: [boost] [addressof] Intel C++ 13 Warning (Cannot be suppressed)
From: Joshua Boyce (raptorfactor_at_[hidden])
Date: 2012-10-13 15:39:35


addressof.hpp causes a warning under Intel C++ 13 when using the highest
warning level, which cannot be suppressed using the regular #pragma
directives. This causes problems when compiling user code with warnings as
errors, as the header causes an error which cannot be disabled. The root of
the issue seems to be that ICC thinks that an rvalue is being passed to a
function which takes a non-const ref, however in this case I think it's a
false positive (ICC apparently isn't smart enough to notice and analyze the
implicit conversion operator). My simple workaround is to turn the
temporary into an lvalue and pass that instead.

After making this change I tested under MSVC 12, GCC 4.7, ICC 13, and Clang
3.1 (all under Windows) and recorded no changes in number of failed
compiles or tests. Is this an acceptable change that could be merged into
trunk?

Thanks.




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk