Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67655 - trunk/libs/ratio/test/ratio_arithmetic
From: vicente.botet_at_[hidden]
Date: 2011-01-04 13:08:43


Author: viboes
Date: 2011-01-04 13:08:42 EST (Tue, 04 Jan 2011)
New Revision: 67655
URL: http://svn.boost.org/trac/boost/changeset/67655

Log:
Boost.Ratio: Try to solve issue

 Test output: Sandia-sun - ratio - ratio_add_fail / sun-5.10
Rev 67644 / Tue, 4 Jan 2011 01:15:39 +0000
Report Time: Tue, 4 Jan 2011 16:29:50 +0000

Compile [2011-01-04 02:06:04 UTC]: fail

    "/opt/sunstudio12.1/bin/CC" +d -library=stlport4 -features=tmplife -features=tmplrefstatic -g -erroff=%none -m64 -KPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_ENABLE_WARNINGS -DBOOST_MPL_NEXT_PRIOR_EXT -DBOOST_RATIO_USES_MPL_ASSERT -I".." -c -o "/scratch2/kbelco/boost/results/boost/bin.v2/libs/ratio/test/ratio_add_fail.test/sun-5.10/debug/address-model-64/stdlib-sun-stlport/ratio_add_fail.o" "../libs/ratio/test/ratio_arithmetic/ratio_add_fail.cpp"

Text files modified:
   trunk/libs/ratio/test/ratio_arithmetic/ratio_add_fail.cpp | 5 ++++-
   1 files changed, 4 insertions(+), 1 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-04 13:08:42 EST (Tue, 04 Jan 2011)
@@ -12,7 +12,10 @@
 // See http://www.boost.org/LICENSE_1_0.txt
 
 #include <boost/ratio.hpp>
+#include <boost/integer_traits.hpp>
 
-typedef boost::ratio<BOOST_RATIO_INTMAX_C(0x7FFFFFFFFFFFFFFF), 1> R1;
+#define BOOST_RATIO_INTMAX_T_MAX boost::integer_traits<boost::intmax_t>::const_max
+
+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-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