Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73789 - sandbox/SOC/2011/checks/boost/checks
From: pierre.talbot.6114_at_[hidden]
Date: 2011-08-15 15:17:46


Author: trademark
Date: 2011-08-15 15:17:45 EDT (Mon, 15 Aug 2011)
New Revision: 73789
URL: http://svn.boost.org/trac/boost/changeset/73789

Log:
Add a function to gain time by reducing the interval of value when we know that we out pass the expected size.
Text files modified:
   sandbox/SOC/2011/checks/boost/checks/limits.hpp | 9 +++++++++
   1 files changed, 9 insertions(+), 0 deletions(-)

Modified: sandbox/SOC/2011/checks/boost/checks/limits.hpp
==============================================================================
--- sandbox/SOC/2011/checks/boost/checks/limits.hpp (original)
+++ sandbox/SOC/2011/checks/boost/checks/limits.hpp 2011-08-15 15:17:45 EDT (Mon, 15 Aug 2011)
@@ -22,6 +22,10 @@
     if( valid_values_counted != expected_size )
       throw exception_size_failure("Too few or too much valid values in the sequence.") ;
   }
+ static bool reach_one_past_the_end(size_t valid_values_counted)
+ {
+ return valid_values_counted > expected_size ;
+ }
 };
 
 template <class exception_size_failure = std::invalid_argument>
@@ -32,6 +36,11 @@
     if( valid_values_counted == 0 )
       throw exception_size_failure("No valid value in this sequence.") ;
   }
+
+ static bool reach_one_past_the_end(size_t valid_values_counted)
+ {
+ return false ;
+ }
 };
 
 }}


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