Boost logo

Boost :

From: Robert Kawulak (kawulak_at_[hidden])
Date: 2008-05-20 15:21:26


> From: Neal Becker
> Is it really intentional that the error handling of
> constrained & operator = (const value_type & v)
>
> uses
> BOOST_ASSERT(_check_value());
>
> But in
> void _initialize()
>
> it uses
> throw_exception<>()(_value, _value, _constraint());

It was intentional, so it's impossible to construct constrained object with
broken invariant even with error policy that ignores invalid values. However,
the current version I'm working on has asserts everywhere, and there's a
requirement added for error policy that it cannot return and leave an object in
an invalid state.

Best regards,
Robert


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk