Boost logo

Geometry :

Subject: Re: [geometry] warnings reported by Clang
From: Barend Gehrels (barend_at_[hidden])
Date: 2012-01-11 15:54:06


Hi,

On 11-1-2012 21:35, Mateusz Loskot wrote:
> On 11 January 2012 20:24, Vishnu<vrang3_at_[hidden]> wrote:
>> I'll set the default values of the pointers to 0 and see if all my tests
>> pass, which I should be the case if Barend's comment ("this is all in the
>> concept checking and never called") still holds. However, if anything has
>> changed to invalidate that comment, please let me know.
> IMHO, it doesn't hurt to have variables initialised, regardless where they are.
> In some cases, it explicit initialisations hurt performance, but this
> is not the case here.
> I hope Barend will agree with me.
>
> Once concepts make it into C++, then compilers will know to ignore such
> uninitialized objects, but so far we have to help the compilers to
> overcome their
> lameness :)

I agree, this is never called, so it does not hurt to initalize them.
However, 0 may sometimes (for ttmath) need to be written in another form
(either T() or an object), especially for ttmath. But go ahead, I will
solve that if it occurs.

Thanks, Barend


Geometry list run by mateusz at loskot.net