Boost logo

Boost Users :

From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-07-23 14:36:16


AMDG

hfye-wila_at_[hidden] 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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net