Opened 14 years ago

Closed 12 years ago

Last modified 12 years ago

#2454 closed Patches (wontfix)

Fusion - MSVC level 1 warnings

Reported by: Paul A. Bristow Owned by: Joel de Guzman
Milestone: To Be Determined Component: fusion
Version: Boost 1.40.0 Severity: Cosmetic
Keywords: fusion warnings Cc:

Description

I am seeing a far number of what MS regard as level 1 (most severe) warnings from various fusion files, for example:

i:\trunk\boost/fusion/iterator/next.hpp(60) : warning C4180: qualifier applied to function type has no meaning; ignored i:\trunk\boost/fusion/sequence/intrinsic/begin.hpp(64) : warning C4180: qualifier applied to function type has no meaning; ignored i:\trunk\boost/fusion/sequence/intrinsic/begin.hpp(71) : warning C4180: qualifier applied to function type has no meaning; ignored i:\trunk\boost/fusion/sequence/intrinsic/end.hpp(64) : warning C4180: qualifier applied to function type has no meaning; ignored i:\trunk\boost/fusion/sequence/intrinsic/end.hpp(71) : warning C4180: qualifier applied to function type has no meaning; ignored i:\trunk\boost/fusion/iterator/prior.hpp(60) : warning C4180: qualifier applied to function type has no meaning; ignored

I doubt if it is worth changing/correcting the code, but users will be justifiably alarmed, especially if, as in my case, I am not explicitly using Fusion!

However I am unclear how best to suppress these warnings, short of a lot of push'n'pop pragmas into a lot of files. Is this not a problem on gcc?

Change History (4)

comment:1 by Paul A. Bristow, 13 years ago

Milestone: Boost 1.37.0Boost 1.42.0
Version: Boost 1.36.0Boost 1.40.0

These still appear in 1.40 and are rather tiresome.

Commenting out the const below supresses these warnings, but I can see it will be tedious to try to find them all, but IMO worth it.

template <typename Iterator> typename result_of::next<Iterator>::type const next(Iterator const& i) {

return result_of::next<Iterator>::call(i);

}

Tell me if I can do anything to help.

comment:2 by Steven Watanabe, 12 years ago

Do you have a test case? The fusion tests don't trigger this, AFAICT.

comment:3 by Paul A. Bristow, 12 years ago

Milestone: Boost 1.42.0To Be Determined
Resolution: wontfix
Status: newclosed

I can no longer remember the code that provoked this. I will re-raise this if it happens again.

Is it true that the const qualifier is really wrong, or just has no effect?

Resolved as wontfix?

comment:4 by Steven Watanabe, 12 years ago

I believe that this warning only occurs when the return type is a const qualified built-in. Since all fusion iterators have class type, I'm not sure how this could happen.

Note: See TracTickets for help on using tickets.