Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50376 - trunk/boost/test
From: gennadiy.rozental_at_[hidden]
Date: 2008-12-23 23:33:18


Author: rogeeff
Date: 2008-12-23 23:33:17 EST (Tue, 23 Dec 2008)
New Revision: 50376
URL: http://svn.boost.org/trac/boost/changeset/50376

Log:
just a comment
Text files modified:
   trunk/boost/test/floating_point_comparison.hpp | 5 +++++
   1 files changed, 5 insertions(+), 0 deletions(-)

Modified: trunk/boost/test/floating_point_comparison.hpp
==============================================================================
--- trunk/boost/test/floating_point_comparison.hpp (original)
+++ trunk/boost/test/floating_point_comparison.hpp 2008-12-23 23:33:17 EST (Tue, 23 Dec 2008)
@@ -221,6 +221,10 @@
     operator()( FPT1 left, FPT2 right, percent_tolerance_t<ToleranceBaseType> tolerance,
                 floating_point_comparison_type fpc_type = FPC_STRONG )
     {
+ // deduce "better" type from types of arguments being compared
+ // if one type is floating and the second integral we use floating type and
+ // value of integral type is promoted to the floating. The same for float and double
+ // But we don't want to compare two values of integral types using this tool.
         typedef typename numeric::conversion_traits<FPT1,FPT2>::supertype FPT;
         BOOST_STATIC_ASSERT( !is_integral<FPT>::value );
 
@@ -233,6 +237,7 @@
     operator()( FPT1 left, FPT2 right, fraction_tolerance_t<ToleranceBaseType> tolerance,
                 floating_point_comparison_type fpc_type = FPC_STRONG )
     {
+ // same as in a comment above
         typedef typename numeric::conversion_traits<FPT1,FPT2>::supertype FPT;
         BOOST_STATIC_ASSERT( !is_integral<FPT>::value );
 


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