variant warnings?
Does Boost.Variant require certain warnings to be disabled? The following program generates a warning for me with VC9:
COMPILER INPUT:
#include
AMDG hfye-wila@spamex.com wrote:
Does Boost.Variant require certain warnings to be disabled? The following program generates a warning for me with VC9:
Warning 4512 is almost always harmless. It's usually caused by structs containing reference members. You're best off disabling it. In Christ, Steven Watanabe
Does Boost.Variant require certain warnings to be disabled? The following
As recommended (thanks Steve!), I have disabled VC9's C4512 warning to get a
canonical Boost.Variant example to compile (in VC9) without warnings:
#pragma warning( push )
#pragma warning( disable : 4512 )
#include
Warning 4512 is almost always harmless. It's usually caused by structs containing reference members. You're best off disabling it. In Christ, Steven Watanabe
AMDG hfye-wila@spamex.com wrote:
*If* this warning is truly harmless, should this be considered a bug in Boost.Variant?
I consider this a low priority bug.
Shouldn't Boost.Variant disable benign warnings in a compiler-independent way?
This warning is Visual Studio specific. In Christ, Steven Watanabe
I agree with Steve that the C4512 warning is a low-priority bug: it is
easily worked around and it's only a level 4 warning. But, I must not be
understanding Boost.Variant (1.35.1) because the following simple example
generates several other VC9 warnings: C4345 (level 2) and C4100 (level 4):
#include
*If* this warning is truly harmless, should this be considered a bug in Boost.Variant?
I consider this a low priority bug.
Shouldn't Boost.Variant disable benign warnings in a compiler-independent way?
This warning is Visual Studio specific. In Christ, Steven Watanabe _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
AMDG hfye-wila@spamex.com wrote:
I agree with Steve that the C4512 warning is a low-priority bug: it is easily worked around and it's only a level 4 warning. But, I must not be understanding Boost.Variant (1.35.1) because the following simple example generates several other VC9 warnings: C4345 (level 2) and C4100 (level 4):
<snip>
Disabling these in the manner above works but I'm hoping one of its authors/maintainers can comment on intended usage of Boost.Variant with VC9? I'm wary of disabling each warning I encounter. That makes it difficult for me to know which warnings are known to be harmless and which indicate errors in my code.
C4345 is a backwards compatibility warning. The compiler is issuing a warning because it treats new int() correctly using value-initialization! You can ignore this unless you care about compatibility with VC6. C4100 (unused variable) is a legitimate warning, but it fires for this: tempate<class T> void destory(T& t) { t.~T(); } even though t is used. It should be safe to disable it for Boost headers. In Christ, Steven Watanabe
participants (2)
-
hfye-wila@spamex.com
-
Steven Watanabe