Opened 13 years ago
Closed 9 years ago
#3020 closed Bugs (fixed)
warning using boost::variant<boost::mpl_::void_>
Reported by: | Owned by: | Antony Polukhin | |
---|---|---|---|
Milestone: | Boost 1.56.0 | Component: | variant |
Version: | Boost 1.48.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Using VC8, get compile warning C4345:
\boost\variant\variant.hpp(1174) : warning C4345: behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized
Attachments (1)
Change History (11)
by , 13 years ago
comment:1 by , 13 years ago
Component: | wave → variant |
---|---|
Owner: | changed from | to
comment:2 by , 13 years ago
comment:3 by , 13 years ago
Thanks for clarifying that the code is functional.
Is there a possibility that the boost header will either suppress or avoid the warning in a later release?
comment:4 by , 13 years ago
I believe that VC9 doesn't generate this warning. It's unlikely to be suppressed in Boost in the near future, since warnings usually get low priority.
comment:5 by , 12 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:6 by , 12 years ago
This warning does show up in vc10. Solution would be to add a
#ifdef _MSC_VER #pragma warning( push ) #pragma warning( disable : 4345 ) #endif
at the top of variant.hpp and
#ifdef _MSC_VER #pragma warning( pop ) #endif
at the bottom.
comment:7 by , 11 years ago
Milestone: | Boost 1.40.0 → To Be Determined |
---|---|
Resolution: | wontfix |
Status: | closed → reopened |
Version: | Boost 1.36.0 → Boost 1.48.0 |
Please see David Sankel's comment:6 above.
Problem has resurfaced in VC10. Just love warnings letting me know that they are doing the right thing.
comment:9 by , 9 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
comment:10 by , 9 years ago
Milestone: | To Be Determined → Boost 1.56.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
In [86650] fix for this issue was merged to release branch.
You can safely ignore this warning. Basically, the compiler is issuing a warning because it is compliant, where previous versions of msvc were not.