20 May 21:21
Re: constrained_value: 1 more question
From: Robert Kawulak <kawulak <at> student.agh.edu.pl>
Subject: Re: constrained_value: 1 more question
Newsgroups: gmane.comp.lib.boost.devel
Date: 2008-05-20 19:21:26 GMT
Subject: Re: constrained_value: 1 more question
Newsgroups: gmane.comp.lib.boost.devel
Date: 2008-05-20 19:21:26 GMT
> 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 _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
RSS Feed