|
Boost : |
From: Jeff Garland (jeff_at_[hidden])
Date: 2002-09-03 12:58:45
> > Who said that sin(interval<date>) needed sin(date) to be defined for it to
> > compile? It only needs the rounding policy to define two methods
> > cos_down(date) and cos_up(date). And the default rounding policy doesn't
> > trust the existence and precision of the transcendental functions so it
> > doesn't rely on them and provides its own dummy functions. So, yes, it
> > will compile.
>
> I think that Guillaume makes an even stronger point: it will compile and
> execute without throwing or dumping an assertion. It will simply return
> the interval [-1,1] (dummy function). What a date does with it is its
> own problem :)
Well, not entirely. From my perspective it would be better if the
the library would fail to compile for nonsensical operations on T, but
I'm not going to lose much sleep over someone trying this particular
case.
> And since the issue is a little moot, I suggest not wasting too much
> bandwith on sin(date). I find the other problems Jeff has raised to
> pertain more significantly to the issue of date intervals, and should
> anyone want to pursue the issue further, these could be discussed first IMHO.
Agreed.
Jeff
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk