Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54417 - sandbox/boost/algorithm
From: marshall_at_[hidden]
Date: 2009-06-27 19:11:35


Author: marshall
Date: 2009-06-27 19:11:33 EDT (Sat, 27 Jun 2009)
New Revision: 54417
URL: http://svn.boost.org/trac/boost/changeset/54417

Log:
Updated to only use 'operator <'
Text files modified:
   sandbox/boost/algorithm/clamp.hpp | 4 +++-
   1 files changed, 3 insertions(+), 1 deletions(-)

Modified: sandbox/boost/algorithm/clamp.hpp
==============================================================================
--- sandbox/boost/algorithm/clamp.hpp (original)
+++ sandbox/boost/algorithm/clamp.hpp 2009-06-27 19:11:33 EDT (Sat, 27 Jun 2009)
@@ -32,9 +32,11 @@
   template<typename V>
   V clamp ( V lo, V hi, V val )
   {
- return val >= hi ? hi : val <= lo ? lo : val;
+// return val >= hi ? hi : val <= lo ? lo : val;
 // Alternately,
 // return std::max ( std::min ( val, hi ), lo );
+// Rewritten to only use operator <
+ return val < lo ? lo : val < hi ? val : hi;
   }
 
 }}


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