Boost logo

Geometry :

Subject: [geometry] Is "dimensions" signed or unsigned?
From: Patrick J. LoPresti (lopresti_at_[hidden])
Date: 2014-09-21 15:45:47


While compiling boost::geometry with a very old compiler (GCC
4.1.2-redhat ; please do not ask why), I got a slew of warnings about
signed-vs-unsigned integer comparisons.

These warnings are harmless, of course, and I can disable them. But it
occurs to me that perhaps it would be better if boost::geometry were
consistent.

For example, in core/coordinate_dimension.hpp, assert_dimension() and
similar functions treat "Dimensions" as an int; while in
index/detail/algorithms/is_valid.hpp, "Dimensions" is a size_t.

It looks to me like most of the library uses size_t for the dimension,
which makes sense to me. Are the developers amenable to patches
silencing these warnings by using size_t consistently? (Or int; I
personally do not mind either choice, as long as it is consistent.)

Thanks.

 - Pat


Geometry list run by mateusz at loskot.net