Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67898 - trunk/libs/ratio/test/ratio_arithmetic
From: vicente.botet_at_[hidden]
Date: 2011-01-09 18:54:55


Author: viboes
Date: 2011-01-09 18:54:54 EST (Sun, 09 Jan 2011)
New Revision: 67898
URL: http://svn.boost.org/trac/boost/changeset/67898

Log:
Boost.Ratio: Force failure to debug condition

Text files modified:
   trunk/libs/ratio/test/ratio_arithmetic/ratio_add_fail.cpp | 2 ++
   1 files changed, 2 insertions(+), 0 deletions(-)

Modified: trunk/libs/ratio/test/ratio_arithmetic/ratio_add_fail.cpp
==============================================================================
--- trunk/libs/ratio/test/ratio_arithmetic/ratio_add_fail.cpp (original)
+++ trunk/libs/ratio/test/ratio_arithmetic/ratio_add_fail.cpp 2011-01-09 18:54:54 EST (Sun, 09 Jan 2011)
@@ -19,3 +19,5 @@
 typedef boost::ratio<BOOST_RATIO_INTMAX_T_MAX, 1> R1;
 typedef boost::ratio<1, 1> R2;
 typedef boost::ratio_add<R1, R2>::type RT;
+
+BOOST_RATIO_STATIC_ASSERT(BOOST_RATIO_INTMAX_T_MAX <= BOOST_RATIO_INTMAX_T_MAX - 1 , BOOST_RATIO_OVERFLOW_IN_ADD, ());


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk