[Boost-bugs] [Boost C++ Libraries] #9067: rational::assign doesn't even have the basic guarantee

Subject: [Boost-bugs] [Boost C++ Libraries] #9067: rational::assign doesn't even have the basic guarantee
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-08-30 04:00:51


#9067: rational::assign doesn't even have the basic guarantee
------------------------------+----------------------
 Reporter: dlwalker | Owner: dlwalker
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: rational
  Version: Boost 1.54.0 | Severity: Problem
 Keywords: |
------------------------------+----------------------
 The current implementation of the `assign` member function assigns the new
 components before normalization checks. Normalization throws if the
 components are too violating to fix, but the object has already been
 changed and the old values have been lost. Worse, if the object was
 created outside of the current stack frame, it will survive the exception
 in a state still violating its invariant!

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9067>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:14 UTC