Boost logo

Boost :

Subject: Re: [boost] Math tools polynomial enhancements
From: John Maddock (jz.maddock_at_[hidden])
Date: 2015-11-02 12:16:45

On 02/11/2015 12:52, Jeremy Murphy wrote:
> Btw, for anyone else interested, the PR for run-time polynomial division is
> open:
> I am a bit conflicted about the question of assert vs exception so wouldn't
> mind hearing more points of view.

I think the issue is that this is a borderline case.

Generally speaking I prefer exceptions plus long-and-tedious error
messages, because it reduces the number of "why does your silly code
crash" bug reports. Asserts I restrict to invariants in my code.

However, any interface that's designed to be used in a tight inner loop
should use asserts instead (plus a really big warning in the docs!).
Something like vector subscripting is a good example.

I'm not sure which this is.... although any usage inside a loop would
likely be trivial compared to any mutating operations on the polynomial?


Boost list run by bdawes at, gregod at, cpdaniel at, john at