Boost logo

Boost :

Subject: Re: [boost] [Review] Boost.Endian mini-review
From: Peter Dimov (lists_at_[hidden])
Date: 2015-01-26 16:42:29

Beman Dawes wrote:
> Perhaps an error checking policy could be added as a template parameter,
> with two supplied - one a nop, the other throwing an exception on
> overflow.

Given that in many, if not most, cases, the check is a no-op - when the
value type and the bits match - it might instead make sense to make the
methods conditionally noexcept when the bits are enough to store everything
in range, and always throw on overflow otherwise.

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