Opened 8 years ago

Closed 6 years ago

#10025 closed Bugs (wontfix)

boost/variant/detail/initializer.hpp does not supress C4503 warnings

Reported by: 8th.realm@… Owned by: Antony Polukhin
Milestone: Boost 1.58.0 Component: variant
Version: Boost 1.55.0 Severity: Cosmetic
Keywords: Cc: 8th.realm@…

Description

After upgrading from 1.53, my project is littered with warning C4503. This warning is typically suppressed in boost/config/compiler/visualc.hpp, but it seems boost variant no longer uses said file.

Compiled using VS2010

Attachments (1)

example.txt (2.1 KB ) - added by 8th.realm@… 8 years ago.
Example of warnings seen

Download all attachments as: .zip

Change History (6)

by 8th.realm@…, 8 years ago

Attachment: example.txt added

Example of warnings seen

comment:1 by Chandler Scott <8th.realm@…>, 8 years ago

Cc: 8th.realm@… added

comment:2 by Antony Polukhin, 8 years ago

Milestone: To Be DeterminedBoost 1.58.0
Owner: changed from ebf to Antony Polukhin
Status: newassigned

boost/config/compiler/visualc.hpp is included via boost/config.hpp so this warning must be suppressed.

Could you provide some test case to reproduce the error?

comment:3 by john.tytgat@…, 7 years ago

FYI, we had exactly the same issue and after investigation it turned out this was because of some legacy hack in our codebase to suppress a C4244 warning when including boost/thread/mutex.hpp (which seems to longer be relevant with VS2013/boost 1.59):

#pragma warning(push)
#pragma warning(disable: 4244)
#include <boost/thread/mutex.hpp>
#pragma warning(pop)

This made that the C4503 warning disable in boost/config.hpp got undone so that made we got those warnings back when include/using other boost components. Maybe the original ticket submitter had the same issue ?

comment:4 by Antony Polukhin, 6 years ago

Does the warning still appears?

comment:5 by Antony Polukhin, 6 years ago

Resolution: wontfix
Status: assignedclosed

A correct solution would be to fix that annoying behavior in the compiler. Otherwise it could be fixed by enabling variadic templates usage in boost::variant for MSVC. Unfortunately MSVC is not ready yet. Waiting for next MSVC.

Note: See TracTickets for help on using tickets.