|
Geometry : |
Subject: Re: [geometry] warnings with gcc
From: Christophe Henry (christophe.j.henry_at_[hidden])
Date: 2012-01-18 16:01:21
Hi Barend,
> I'm applying your patches. Nearly all of them will be taken over (so: at
> least in Trunk).
Good, less warnings for me.
> There is one controversial one: the patch of point.hpp
>
> You have initialized the values to zero which is a logical thing to do. And
> in this case I knew there were warnings. But... We don't want to initialize
> them to zero... There was some correspondence about that years ago on the
> Boost mailing list. People are quite sensitive to this. Like C++ does not
> initialize an int to zero, we also don't want to do this to our points.
Ah yes I kind of expected this one, I was pretty sure this was
intentional. But if you don't initialize, there is a risk, right? OTOH
it might be paying for something useless. As you're initializing in
the second constructor, I'm wondering if there is not a way to use
this, with a templated constructor and enable_if. I'll think about it
and tell you if I have an idea.
> I saw some other things (based on your patch) that could be done (removing
> the if's there), so will do that, and will think about other solutions
> (ideas welcome) to surpress the warnings.
I'm sure there is a way, let me think about it ;-)
Regards,
Christophe
PS: work-related question, did you hear about a polygon-skeleton
algorithm with geometry? I'd be pretty interested in such a thing.
Geometry list run by mateusz at loskot.net