[std-interval] Mathematical relations and default initialization

Sylvain Pion Sylvain.Pion at sophia.inria.fr
Fri Sep 15 01:01:07 PDT 2006


(Ron, I guess you mistakenly replied to me personally,
  so I re-reply on the list).

Ron Avitzur wrote:
>>>>  1- no default constructor at all
>>>>  2- [0,0]
>>>>  3- empty
>>>>  4- whole
>>>>  5- uninitialized tag
>>>>  6- see below (something a la "singular iterator")
>>
>> As George says, there is indeed no perfect choice.  I can see good
>> arguments supporting 2, 3, 4, 6 (I see 5 as a debug mode allowed by 6).
> 
> In defense of 1, I'll reiterate my concern from April that folks expect
> declaring  { double foo[kSize]; ...} is free while having any default
> constructor can make { interval<double> foo[kSize]; ... } in an inner
> loop be very costly.
> 
> I encountered precisely this a few years ago in a context that made it
> very difficult to recognize the inefficiency.

So, you are arguing for 6, like me.

1 means no default constructor, that is, a private one.
At least, this is how I understood 1.

-- 
Sylvain


More information about the Std-interval mailing list