Boost logo

Geometry :

Subject: Re: [geometry] Compiler warnings in geometry 1.50.0
From: Volker Schöch (vschoech_at_[hidden])
Date: 2012-07-09 03:40:18

> Or, could you wrap the #include with #pragma warning to disable these annoyances locally?
> It usually takes 3 lines of code, including push and pop, and works well.

Mateusz, thank you for your suggestion. That's exactly what I do now (and have been doing with warnings in older boost versions). I'm fine with that solution for the moment, but when I update to a new version of boost, obviously I want to eliminate any #pragma warnings that are no longer relevant. Collecting the new warnings was a byproduct of that process and I just thought I'd let you know.

Barend, thank you for your kind replies, too! Interestingly, of the boost libraries we use, geometry is currently the only one that requires #pragma warning in our environment.

For the record, this is what it currently reads:

#if 105000 < BOOST_VERSION
        // TODO: With a new boost version, remove the following #pragma warning
        // statements and check if the warnings have been fixed.

#pragma warning( push )
#pragma warning( disable: 4127 ) // error C4127: conditional expression is constant ...\boost_1_50_0\boost\geometry\algorithms\correct.hpp(138)
#pragma warning( disable: 4189 ) // error C4189: 'n' : local variable is initialized but not referenced ...\boost_1_50_0\boost\geometry\algorithms\detail\overlay\get_turns.hpp(140)
#pragma warning( disable: 4244 ) // error C4244: '=' : conversion from 'double' to '__int64', possible loss of data ...\boost_1_50_0\boost\geometry\algorithms\detail\overlay\calculate_distance_policy.hpp(49)
#include <boost/geometry.hpp>
#pragma warning( pop )

Thanks again,

Volker Schöch | vschoech_at_[hidden]
Senior Software Engineer
think-cell Software GmbH | Chausseestr. 8/E | 10115 Berlin | Germany | phone +49 30 666473-10 | US phone +1 800 891 8091
Amtsgericht Berlin-Charlottenburg, HRB 85229 | European Union VAT Id DE813474306
Directors: Dr. Markus Hannebauer, Dr. Arno Schoedl

Geometry list run by mateusz at