Boost logo

Boost :

From: JOAQUIN LOPEZ MU?Z (joaquin_at_[hidden])
Date: 2007-12-15 05:50:32


----- Mensaje original -----
De: John Maddock <john_at_[hidden]>
Fecha: Sábado, Diciembre 15, 2007 11:22 am
Asunto: [boost] [spirit] Causes a blizzard of warning from
Boost.Format under MSVC?
Para: Boost mailing list <boost_at_[hidden]>

> I'm at a loss to explain this, but this program:
>
> #include <boost/math/special_functions.hpp>
>
> int main()
> {
> boost::math::erf(2);
> }
>
> Compiles cleaning with MSVC-8, but as soon as I add a particular
> spirit
> #include:
>
> #include <boost/math/special_functions.hpp>
> #include <boost/spirit/utility/distinct.hpp>
>
> int main()
> {
> boost::math::erf(2);
> }
>
> Then Boost.Format (used internally be Boost.Math for error message
> formatting) issues a whole blizzard of warnings, that I actually
> thought I had fixed.

I'm able to reproduce the behavior you describe and don't
have any explanation for it either. But note one thing: the warnings
I've got in the second scenario are all C4267 (conversion from
size_t to const unsigned int, possible loss of data), which you
are not explicitly silencing. If you add the corersponding pragma
warning(disable: 4267) at boost/math/policies/error_handling.hpp,
compile is clean then in the second scenario as well.

Just my 2 cents,

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk