Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76560 - in sandbox/SOC/2011/checks: boost/checks libs/checks/example libs/checks/test
From: pierre.talbot.6114_at_[hidden]
Date: 2012-01-17 13:43:49


Author: trademark
Date: 2012-01-17 13:43:47 EST (Tue, 17 Jan 2012)
New Revision: 76560
URL: http://svn.boost.org/trac/boost/changeset/76560

Log:
Correct many GCC compiler errors (mainly template and typename errors, see this link: http://stackoverflow.com/questions/610245/where-and-why-do-i-have-to-put-the-template-and-typename-keywords/613132#613132 ). Add a missing include.
Text files modified:
   sandbox/SOC/2011/checks/boost/checks/basic_check_algorithm.hpp | 21 ++++++-----
   sandbox/SOC/2011/checks/boost/checks/basic_checks.hpp | 69 +++++++++++++++++++++------------------
   sandbox/SOC/2011/checks/boost/checks/checks_fwd.hpp | 6 +-
   sandbox/SOC/2011/checks/boost/checks/iteration_sense.hpp | 4 +-
   sandbox/SOC/2011/checks/boost/checks/luhn.hpp | 10 ++--
   sandbox/SOC/2011/checks/boost/checks/modulus10.hpp | 12 ++----
   sandbox/SOC/2011/checks/boost/checks/modulus11.hpp | 6 +-
   sandbox/SOC/2011/checks/boost/checks/modulus97.hpp | 12 +++---
   sandbox/SOC/2011/checks/boost/checks/verhoeff.hpp | 2
   sandbox/SOC/2011/checks/boost/checks/visa.hpp | 6 +-
   sandbox/SOC/2011/checks/boost/checks/weighted_sum.hpp | 3 +
   sandbox/SOC/2011/checks/libs/checks/example/vin.hpp | 30 ++++++++--------
   sandbox/SOC/2011/checks/libs/checks/test/jamfile.v2 | 2
   sandbox/SOC/2011/checks/libs/checks/test/test_checks_tools.cpp | 5 --
   14 files changed, 95 insertions(+), 93 deletions(-)

Modified: sandbox/SOC/2011/checks/boost/checks/basic_check_algorithm.hpp
==============================================================================
--- sandbox/SOC/2011/checks/boost/checks/basic_check_algorithm.hpp (original)
+++ sandbox/SOC/2011/checks/boost/checks/basic_check_algorithm.hpp 2012-01-17 13:43:47 EST (Tue, 17 Jan 2012)
@@ -29,16 +29,17 @@
 /*! \class basic_check_algorithm
     \brief The main check algorithm class that provides every static function that can be overloaded.\n Most of the functions must be re-implemented to have the desired behavior.
 
- \tparam iteration_sense must meet the iteration_sense concept requirements.
+ \tparam traversal_direction must meet the iterator_direction concept requirements.
     \tparam number_of_virtual_value_skipped Helper functions to provide the same behavior on sequence with and without checkdigits. No "real" value in the sequence will be skipped.
 */
-template <typename iteration_sense, unsigned int number_of_virtual_value_skipped = 0>
+template <typename traversal_direction, unsigned int number_of_virtual_value_skipped = 0>
 struct basic_check_algorithm
 {
   /*!
     \brief This is the sense or direction of the iteration (begins with the right or the leftmost value).
   */
- typedef iteration_sense iteration_sense ;
+ typedef traversal_direction iterator_direction;
+ typedef iterator_direction iteration_sense; // Need to be deleted, just for compatibility...
 
   /*!
     \brief translate a value of the sequence into an integer valid value.
@@ -92,9 +93,9 @@
     \remarks This function should be overloaded if you want to compute the check digit of a sequence.
   */
   template <typename checkdigit>
- static typename checkdigit compute_checkdigit( int checksum )
+ static checkdigit compute_checkdigit(int checksum)
   {
- return checkdigit() ;
+ return checkdigit();
   }
 
   /*!
@@ -111,9 +112,9 @@
     \remarks This function should be overloaded if you want your algorithm to compute more than one check digit (through it works for just one check digit too).
   */
   template <typename checkdigits_iter>
- static typename checkdigits_iter compute_multicheckdigit( int checksum, checkdigits_iter checkdigits )
+ static checkdigits_iter compute_multicheckdigit(int checksum, checkdigits_iter checkdigits)
   {
- return checkdigits ;
+ return checkdigits;
   }
 
   /*!
@@ -126,7 +127,7 @@
 
     \remarks This function should be overloaded if you want to calculate the checksum of a sequence.
   */
- static void operate_on_valid_value( const int current_valid_value , const unsigned int valid_value_counter, int &checksum )
+ static void operate_on_valid_value(const int current_valid_value, const unsigned int valid_value_counter, int &checksum)
   {
   }
 
@@ -140,7 +141,7 @@
 
     \remarks This function should be overloaded if you want to filter the values with their positions.
   */
- static void filter_valid_value_with_pos(const unsigned int current_valid_value , const unsigned int current_value_position )
+ static void filter_valid_value_with_pos(const unsigned int current_valid_value, const unsigned int current_value_position)
   {
   }
 
@@ -163,4 +164,4 @@
 
 }} // namespace boost namespace checks
 
-#endif //BOOST_CHECKS_BASIC_CHECK_ALGO_HPP
\ No newline at end of file
+#endif //BOOST_CHECKS_BASIC_CHECK_ALGO_HPP

Modified: sandbox/SOC/2011/checks/boost/checks/basic_checks.hpp
==============================================================================
--- sandbox/SOC/2011/checks/boost/checks/basic_checks.hpp (original)
+++ sandbox/SOC/2011/checks/boost/checks/basic_checks.hpp 2012-01-17 13:43:47 EST (Tue, 17 Jan 2012)
@@ -39,23 +39,23 @@
     \returns The checksum of the sequence calculated with algorithm.
   */
 template <typename algorithm, typename size_contract, typename iterator>
-int compute_checksum(iterator seq_begin, iterator seq_end )
+int compute_checksum(iterator seq_begin, iterator seq_end)
 {
   unsigned int valid_value_counter = 0;
- int checksum = 0 ;
- for(; seq_begin != seq_end && !size_contract::reach_one_past_the_end(valid_value_counter) ; ++seq_begin )
+ int checksum = 0;
+ for(; seq_begin != seq_end && !size_contract::reach_one_past_the_end(valid_value_counter); ++seq_begin)
   {
     try{
- int current_valid_value = algorithm::translate_to_valid_value( *seq_begin, valid_value_counter );
- algorithm::filter_valid_value_with_pos( current_valid_value, valid_value_counter ) ;
- algorithm::operate_on_valid_value( current_valid_value, valid_value_counter, checksum ) ;
+ int current_valid_value = algorithm::translate_to_valid_value(*seq_begin, valid_value_counter);
+ algorithm::filter_valid_value_with_pos(current_valid_value, valid_value_counter);
+ algorithm::operate_on_valid_value(current_valid_value, valid_value_counter, checksum);
       ++valid_value_counter ;
     }
- catch( boost::checks::translation_exception ){
+ catch(boost::checks::translation_exception){
     }
   }
- size_contract::respect_size_contract( valid_value_counter );
- return checksum ;
+ size_contract::respect_size_contract(valid_value_counter);
+ return checksum;
 }
 
 /*!
@@ -74,12 +74,13 @@
 */
 
 template <typename algorithm, typename size_contract, typename check_range>
-int compute_checksum( const check_range &check_seq )
+int compute_checksum(const check_range &check_seq)
 {
- algorithm::iteration_sense::iterator<check_range>::type begin = algorithm::iteration_sense::begin( check_seq );
- algorithm::iteration_sense::iterator<check_range>::type end = algorithm::iteration_sense::end( check_seq );
+ typedef typename algorithm::iteration_sense::template iterator<check_range>::type iterator;
+ iterator begin = algorithm::iteration_sense::begin(check_seq);
+ iterator end = algorithm::iteration_sense::end(check_seq);
 
- return compute_checksum<algorithm, size_contract>( begin, end );
+ return compute_checksum<algorithm, size_contract>(begin, end);
 }
 
 /*!
@@ -96,10 +97,10 @@
     \returns @c true if the checkdigit is correct, @c false otherwise.
 */
 template <typename algorithm, typename check_range>
-bool check_sequence (const check_range& check_seq)
+bool check_sequence(const check_range& check_seq)
 {
- int checksum = compute_checksum<algorithm, boost::checks::no_null_size_contract<> >( check_seq ) ;
- return algorithm::validate_checksum( checksum ) ;
+ int checksum = compute_checksum<algorithm, boost::checks::no_null_size_contract<> >(check_seq);
+ return algorithm::validate_checksum(checksum);
 }
 
 /*!
@@ -117,10 +118,10 @@
     \returns @c true if the checkdigit is correct, @c false otherwise.
 */
 template <typename algorithm, size_t size_expected, typename check_range>
-bool check_sequence (const check_range& check_seq)
+bool check_sequence(const check_range& check_seq)
 {
- int checksum = compute_checksum<algorithm, boost::checks::strict_size_contract<size_expected> >( check_seq ) ;
- return algorithm::validate_checksum( checksum ) ;
+ int checksum = compute_checksum<algorithm, boost::checks::strict_size_contract<size_expected> >(check_seq);
+ return algorithm::validate_checksum(checksum);
 }
 
 /*!
@@ -137,10 +138,11 @@
     \returns The check digit of the type of a value in check_seq.
 */
 template <typename algorithm, typename check_range>
-typename algorithm::checkdigit<check_range>::type compute_checkdigit (const check_range& check_seq)
+typename algorithm::template checkdigit<check_range>::type compute_checkdigit(const check_range& check_seq)
 {
- int checksum = compute_checksum<algorithm, boost::checks::no_null_size_contract<> >( check_seq ) ;
- return algorithm::compute_checkdigit<typename algorithm::checkdigit<check_range>::type>( checksum ) ;
+ typedef typename algorithm::template checkdigit<check_range>::type checkdigit_type;
+ int checksum = compute_checksum<algorithm, boost::checks::no_null_size_contract<> >(check_seq);
+ return algorithm::template compute_checkdigit<checkdigit_type>(checksum);
 }
 
 /*!
@@ -158,10 +160,11 @@
     \returns The check digit of the type of a value in check_seq.
 */
 template <typename algorithm, size_t size_expected, typename check_range>
-typename algorithm::checkdigit<check_range>::type compute_checkdigit (const check_range& check_seq)
+typename algorithm::template checkdigit<check_range>::type compute_checkdigit (const check_range& check_seq)
 {
- int checksum = compute_checksum<algorithm, boost::checks::strict_size_contract<size_expected> >( check_seq ) ;
- return algorithm::compute_checkdigit<typename algorithm::checkdigit<check_range>::type>( checksum ) ;
+ typedef typename algorithm::template checkdigit<check_range>::type checkdigit_type;
+ int checksum = compute_checksum<algorithm, boost::checks::strict_size_contract<size_expected> >(check_seq);
+ return algorithm::template compute_checkdigit<checkdigit_type>(checksum);
 }
 
 /*!
@@ -181,10 +184,10 @@
     \returns An iterator initialized at one pass the end of checkdigits.
 */
 template <typename algorithm, typename check_range, typename checkdigit_iterator>
-typename checkdigit_iterator compute_multicheckdigit (const check_range& check_seq, checkdigit_iterator checkdigits)
+checkdigit_iterator compute_multicheckdigit (const check_range& check_seq, checkdigit_iterator checkdigits)
 {
- int checksum = compute_checksum<algorithm, boost::checks::no_null_size_contract<> >( check_seq ) ;
- return algorithm::compute_multicheckdigit( checksum, checkdigits ) ;
+ int checksum = compute_checksum<algorithm, boost::checks::no_null_size_contract<> >(check_seq);
+ return algorithm::compute_multicheckdigit(checksum, checkdigits);
 }
 
 /*!
@@ -204,11 +207,13 @@
     \returns An iterator initialized at one pass the end of checkdigits.
 */
 template <typename algorithm, size_t size_expected, typename check_range, typename checkdigit_iterator>
-typename checkdigit_iterator compute_multicheckdigit (const check_range& check_seq, checkdigit_iterator checkdigits)
+checkdigit_iterator compute_multicheckdigit (const check_range& check_seq, checkdigit_iterator checkdigits)
 {
- int checksum = compute_checksum<algorithm, boost::checks::strict_size_contract<size_expected> >( check_seq ) ;
- return algorithm::compute_multicheckdigit( checksum, checkdigits ) ;
+ int checksum = compute_checksum<algorithm, boost::checks::strict_size_contract<size_expected> >(check_seq) ;
+ return algorithm::compute_multicheckdigit(checksum, checkdigits);
 }
 
-}} // namespace boost namespace checks
+} // namespace checks
+} // namespace boost
+
 #endif // BOOST_CHECK_BASIC_HPP

Modified: sandbox/SOC/2011/checks/boost/checks/checks_fwd.hpp
==============================================================================
--- sandbox/SOC/2011/checks/boost/checks/checks_fwd.hpp (original)
+++ sandbox/SOC/2011/checks/boost/checks/checks_fwd.hpp 2012-01-17 13:43:47 EST (Tue, 17 Jan 2012)
@@ -123,10 +123,10 @@
 bool check_mod97_10 (const check_range& check_seq) ;
 
 template <size_t size_expected, typename check_range, typename checkdigits_iter>
-typename checkdigits_iter compute_mod97_10 (const check_range& check_seq, checkdigits_iter mod97_checkdigits) ;
+checkdigits_iter compute_mod97_10 (const check_range& check_seq, checkdigits_iter mod97_checkdigits) ;
 
 template <typename check_range, typename checkdigits_iter>
-typename checkdigits_iter compute_mod97_10 (const check_range& check_seq, checkdigits_iter mod97_checkdigits) ;
+checkdigits_iter compute_mod97_10 (const check_range& check_seq, checkdigits_iter mod97_checkdigits) ;
 
 // EAN-13 and EAN-8
 
@@ -191,4 +191,4 @@
 
 
 }} // namespace boost namespace checks
-#endif \\ BOOST_CHECK_CHECKS_FWD_HPP
\ No newline at end of file
+#endif // BOOST_CHECK_CHECKS_FWD_HPP

Modified: sandbox/SOC/2011/checks/boost/checks/iteration_sense.hpp
==============================================================================
--- sandbox/SOC/2011/checks/boost/checks/iteration_sense.hpp (original)
+++ sandbox/SOC/2011/checks/boost/checks/iteration_sense.hpp 2012-01-17 13:43:47 EST (Tue, 17 Jan 2012)
@@ -6,7 +6,7 @@
 // See http://www.boost.org for updates, documentation, and revision history.
 
 /*! \file
- \brief Provides two sense or direction of iteration to run through the sequence, either from right to left or left to right.
+ \brief Provides two direction of iteration to run through the sequence, either from right to left or left to right.
 */
 
 
@@ -102,4 +102,4 @@
 
 
 }}
-#endif // BOOST_CHECKS_ITERATION_SENSE_HPP
\ No newline at end of file
+#endif // BOOST_CHECKS_ITERATION_SENSE_HPP

Modified: sandbox/SOC/2011/checks/boost/checks/luhn.hpp
==============================================================================
--- sandbox/SOC/2011/checks/boost/checks/luhn.hpp (original)
+++ sandbox/SOC/2011/checks/boost/checks/luhn.hpp 2012-01-17 13:43:47 EST (Tue, 17 Jan 2012)
@@ -13,7 +13,7 @@
 #define BOOST_CHECKS_LUHN_INCLUDED
 
 #ifdef _MSC_VER
- #pragma once
+ #pragma once
 #endif
 
 #include <boost/checks/modulus10.hpp>
@@ -24,12 +24,12 @@
 /*!
   \brief This is the weight used by the Luhn algorithm.
 */
-typedef boost::checks::weight<1,2> luhn_weight ;
+typedef boost::checks::weight<1,2> luhn_weight;
 
 /*!
   \brief This is the running sense to check an Luhn number.
 */
-typedef boost::checks::rightmost luhn_sense ;
+typedef boost::checks::rightmost luhn_sense;
 
 /*! \class luhn_algorithm
     \brief This class can be used to compute or validate checksum with the Luhn algorithm.
@@ -83,7 +83,7 @@
 template <size_t size_expected, typename check_range>
 bool check_luhn (const check_range& check_seq)
 {
- return boost::checks::check_sequence<luhn_check_algorithm, size_expected> ( check_seq ) ;
+ return boost::checks::check_sequence<luhn_check_algorithm, size_expected>(check_seq);
 }
 
 /*!
@@ -101,7 +101,7 @@
 template <typename check_range>
 bool check_luhn (const check_range& check_seq)
 {
- return boost::checks::check_sequence<luhn_check_algorithm> ( check_seq ) ;
+ return boost::checks::check_sequence<luhn_check_algorithm> (check_seq);
 }
 
 /*!

Modified: sandbox/SOC/2011/checks/boost/checks/modulus10.hpp
==============================================================================
--- sandbox/SOC/2011/checks/boost/checks/modulus10.hpp (original)
+++ sandbox/SOC/2011/checks/boost/checks/modulus10.hpp 2012-01-17 13:43:47 EST (Tue, 17 Jan 2012)
@@ -18,8 +18,6 @@
 
 #include <boost/lexical_cast.hpp>
 #include <boost/checks/translation_exception.hpp>
-#include <boost/checks/weight.hpp>
-#include <boost/checks/iteration_sense.hpp>
 #include <boost/checks/weighted_sum.hpp>
 
 namespace boost{
@@ -44,7 +42,7 @@
   */
   static bool validate_checksum(int checksum)
   {
- return !(checksum % 10) ;
+ return !(checksum % 10);
   }
 
   /*!
@@ -58,12 +56,12 @@
     \returns The modulus 10 check digit of checksum.
   */
   template <typename checkdigit>
- static typename checkdigit compute_checkdigit( int checksum )
+ static checkdigit compute_checkdigit(int checksum)
   {
     try{
- return boost::lexical_cast<checkdigit>((10 - checksum % 10) % 10 ) ;
- }catch( boost::bad_lexical_cast ){
- throw boost::checks::translation_exception() ;
+ return boost::lexical_cast<checkdigit>((10 - checksum % 10) % 10);
+ }catch(boost::bad_lexical_cast){
+ throw boost::checks::translation_exception();
     }
   }
 };

Modified: sandbox/SOC/2011/checks/boost/checks/modulus11.hpp
==============================================================================
--- sandbox/SOC/2011/checks/boost/checks/modulus11.hpp (original)
+++ sandbox/SOC/2011/checks/boost/checks/modulus11.hpp 2012-01-17 13:43:47 EST (Tue, 17 Jan 2012)
@@ -93,14 +93,14 @@
     \returns The modulus 11 check digit of checksum. 'X' is returned if the check digit value is equal to 10.
   */
   template <typename checkdigit>
- static typename checkdigit compute_checkdigit( int checksum )
+ static checkdigit compute_checkdigit( int checksum )
   {
      return translate_checkdigit<checkdigit>((11 - checksum % 11) % 11) ;
   }
 
 protected:
   template <typename checkdigit>
- static typename checkdigit translate_checkdigit( int _checkdigit )
+ static checkdigit translate_checkdigit( int _checkdigit )
   {
     try
     {
@@ -218,4 +218,4 @@
 }} // namespace boost namespace checks
 
 
-#endif //BOOST_CHECKS_MOD10_HPP
\ No newline at end of file
+#endif //BOOST_CHECKS_MOD10_HPP

Modified: sandbox/SOC/2011/checks/boost/checks/modulus97.hpp
==============================================================================
--- sandbox/SOC/2011/checks/boost/checks/modulus97.hpp (original)
+++ sandbox/SOC/2011/checks/boost/checks/modulus97.hpp 2012-01-17 13:43:47 EST (Tue, 17 Jan 2012)
@@ -68,14 +68,14 @@
     \returns An iterator initialized at one pass to the end of the two check digits.
   */
   template <typename checkdigits_iter>
- static typename checkdigits_iter compute_multicheckdigit( int checksum, checkdigits_iter checkdigits )
+ static checkdigits_iter compute_multicheckdigit( int checksum, checkdigits_iter checkdigits )
   {
     unsigned int mod97_checkdigits = 98 - (checksum % 97) ;
 
     try{
- *checkdigits = boost::lexical_cast<checkdigits_iter::value_type>(mod97_checkdigits / 10) ;
+ *checkdigits = boost::lexical_cast<typename checkdigits_iter::value_type>(mod97_checkdigits / 10) ;
       ++checkdigits;
- *checkdigits = boost::lexical_cast<checkdigits_iter::value_type>(mod97_checkdigits % 10) ;
+ *checkdigits = boost::lexical_cast<typename checkdigits_iter::value_type>(mod97_checkdigits % 10) ;
       ++checkdigits;
     }
     catch( boost::bad_lexical_cast ){
@@ -197,7 +197,7 @@
     \returns The check digits are stored into mod97_checkdigits. The range of these is [0..9][0..9].
 */
 template <size_t size_expected, typename check_range, typename checkdigits_iter>
-typename checkdigits_iter compute_mod97_10 (const check_range& check_seq, checkdigits_iter mod97_checkdigits)
+checkdigits_iter compute_mod97_10 (const check_range& check_seq, checkdigits_iter mod97_checkdigits)
 {
   return boost::checks::compute_multicheckdigit<mod97_10_compute_algorithm, size_expected> ( check_seq, mod97_checkdigits ) ;
 }
@@ -218,7 +218,7 @@
     \returns The check digits are stored into mod97_checkdigits. The range of these is [0..9][0..9].
 */
 template <typename check_range, typename checkdigits_iter>
-typename checkdigits_iter compute_mod97_10 (const check_range& check_seq, checkdigits_iter mod97_checkdigits)
+checkdigits_iter compute_mod97_10 (const check_range& check_seq, checkdigits_iter mod97_checkdigits)
 {
   return boost::checks::compute_multicheckdigit<mod97_10_compute_algorithm> ( check_seq, mod97_checkdigits ) ;
 }
@@ -226,4 +226,4 @@
 
 }} // namespace boost namespace checks
 
-#endif //BOOST_CHECKS_MOD97_HPP
\ No newline at end of file
+#endif //BOOST_CHECKS_MOD97_HPP

Modified: sandbox/SOC/2011/checks/boost/checks/verhoeff.hpp
==============================================================================
--- sandbox/SOC/2011/checks/boost/checks/verhoeff.hpp (original)
+++ sandbox/SOC/2011/checks/boost/checks/verhoeff.hpp 2012-01-17 13:43:47 EST (Tue, 17 Jan 2012)
@@ -105,7 +105,7 @@
     \returns The Verhoeff check digit of checksum.
   */
   template <typename checkdigit>
- static typename checkdigit compute_checkdigit( int checksum )
+ static checkdigit compute_checkdigit( int checksum )
   {
     static const unsigned int inv[] = { 0, 4, 3, 2, 1, 5, 6, 7, 8, 9 } ;
 

Modified: sandbox/SOC/2011/checks/boost/checks/visa.hpp
==============================================================================
--- sandbox/SOC/2011/checks/boost/checks/visa.hpp (original)
+++ sandbox/SOC/2011/checks/boost/checks/visa.hpp 2012-01-17 13:43:47 EST (Tue, 17 Jan 2012)
@@ -36,7 +36,7 @@
     \tparam number_of_virtual_value_skipped Helper functions to provide same behavior on a sequence with and without check digits. No "real" value in the sequence will be skipped.
 */
 template <unsigned int number_of_virtual_value_skipped = 0>
-struct visa_algorithm : boost::checks::luhn_algorithm < number_of_virtual_value_skipped >
+struct visa_algorithm : boost::checks::luhn_algorithm <number_of_virtual_value_skipped>
 {
   /*!
     \brief Verify that a number matches the Visa pattern.
@@ -82,7 +82,7 @@
 template <typename check_range>
 bool check_visa (const check_range& check_seq)
 {
- return boost::checks::check_sequence<visa_check_algorithm, VISA_SIZE> ( check_seq ) ;
+ return boost::checks::check_sequence<visa_check_algorithm, VISA_SIZE>(check_seq);
 }
 
 /*!
@@ -102,7 +102,7 @@
 template <typename check_range>
 typename boost::checks::visa_compute_algorithm::checkdigit<check_range>::type compute_visa (const check_range& check_seq)
 {
- return boost::checks::compute_checkdigit<visa_compute_algorithm, VISA_SIZE_WITHOUT_CHECKDIGIT> ( check_seq ) ;
+ return boost::checks::compute_checkdigit<visa_compute_algorithm, VISA_SIZE_WITHOUT_CHECKDIGIT>(check_seq);
 }
 
 

Modified: sandbox/SOC/2011/checks/boost/checks/weighted_sum.hpp
==============================================================================
--- sandbox/SOC/2011/checks/boost/checks/weighted_sum.hpp (original)
+++ sandbox/SOC/2011/checks/boost/checks/weighted_sum.hpp 2012-01-17 13:43:47 EST (Tue, 17 Jan 2012)
@@ -18,6 +18,7 @@
 
 #include <boost/checks/weight.hpp>
 #include <boost/checks/iteration_sense.hpp>
+#include <boost/checks/basic_checks.hpp>
 #include <boost/checks/basic_check_algorithm.hpp>
 
 namespace boost{
@@ -31,7 +32,7 @@
     \tparam number_of_virtual_value_skipped Helper function to provide same behavior on sequence with and without checkdigits. No "real" value in the sequence will be skipped.
 */
 template <typename weight, typename iteration_sense, unsigned int number_of_virtual_value_skipped = 0>
-struct weighted_sum_algorithm : boost::checks::basic_check_algorithm< iteration_sense >
+struct weighted_sum_algorithm : boost::checks::basic_check_algorithm<iteration_sense>
 {
   /*!
     \brief Compute an operation on the checksum with the current valid value.

Modified: sandbox/SOC/2011/checks/libs/checks/example/vin.hpp
==============================================================================
--- sandbox/SOC/2011/checks/libs/checks/example/vin.hpp (original)
+++ sandbox/SOC/2011/checks/libs/checks/example/vin.hpp 2012-01-17 13:43:47 EST (Tue, 17 Jan 2012)
@@ -45,43 +45,43 @@
     catch( boost::bad_lexical_cast )
     {
       // Transform the value to be between 1 and 26.
- if( current_value >= 'a' && current_value <= 'z' )
- valid_value = current_value - 'a' + 1 ;
- else if( current_value >= 'A' && current_value <= 'Z' )
- valid_value = current_value - 'A' + 1 ;
+ if(current_value >= 'a' && current_value <= 'z')
+ valid_value = current_value - 'a' + 1;
+ else if(current_value >= 'A' && current_value <= 'Z')
+ valid_value = current_value - 'A' + 1;
       else
- throw boost::checks::translation_exception() ;
+ throw boost::checks::translation_exception();
 
- if ( valid_value == 9 || valid_value == 15 || valid_value == 17)
+ if (valid_value == 9 || valid_value == 15 || valid_value == 17)
         throw std::invalid_argument( "The letter I, O and Q are not allowed." );
 
- if ( valid_value_counter == VIN_CHECKDIGIT_POS && number_of_virtual_value_skipped == 0)
+ if (valid_value_counter == VIN_CHECKDIGIT_POS && number_of_virtual_value_skipped == 0)
       {
- if ( valid_value != 24 )
- throw std::invalid_argument( "The check digit should be a digit or X or x." );
+ if (valid_value != 24)
+ throw std::invalid_argument("The check digit should be a digit or X or x.");
         else
           valid_value = 10 ;
- valid_value = 11 - valid_value ;
+ valid_value = 11 - valid_value;
       }
       else
         valid_value = valid_value % 10 + valid_value / 10 + (valid_value > 18) ;
     }
- if( valid_value > 10)
- throw boost::checks::translation_exception() ;
+ if(valid_value > 10)
+ throw boost::checks::translation_exception();
 
- return valid_value ;
+ return valid_value;
   }
   //]
 
   //[vin_operation_module
- static void operate_on_valid_value( const int current_valid_value, const unsigned int valid_value_counter, int &checksum )
+ static void operate_on_valid_value(const int current_valid_value, const unsigned int valid_value_counter, int &checksum)
   {
     if( number_of_virtual_value_skipped == 0 && valid_value_counter == VIN_CHECKDIGIT_POS )
       checksum += current_valid_value ;
     else
     {
       unsigned int weight_position = valid_value_counter - (number_of_virtual_value_skipped == 0 && valid_value_counter > VIN_CHECKDIGIT_POS) ;
- int current_weight = vin_weight::weight_associated_with_pos( weight_position ) ;
+ int current_weight = vin_weight::weight_associated_with_pos(weight_position) ;
       checksum += current_valid_value * current_weight ;
     }
   }

Modified: sandbox/SOC/2011/checks/libs/checks/test/jamfile.v2
==============================================================================
--- sandbox/SOC/2011/checks/libs/checks/test/jamfile.v2 (original)
+++ sandbox/SOC/2011/checks/libs/checks/test/jamfile.v2 2012-01-17 13:43:47 EST (Tue, 17 Jan 2012)
@@ -59,5 +59,5 @@
 
 test-suite "Checks"
     : [ run test_checks.cpp boost_unit_test ]
- [ run test_checks_tools.cpp boost_unit_test ]
+ [ run test_checks_tools.cpp boost_unit_test ]
     ;

Modified: sandbox/SOC/2011/checks/libs/checks/test/test_checks_tools.cpp
==============================================================================
--- sandbox/SOC/2011/checks/libs/checks/test/test_checks_tools.cpp (original)
+++ sandbox/SOC/2011/checks/libs/checks/test/test_checks_tools.cpp 2012-01-17 13:43:47 EST (Tue, 17 Jan 2012)
@@ -9,12 +9,9 @@
 
 // Boost test of tools used by the Boost::checks library.
 
-// See http://www.boost.org/doc/libs/1_47_1/libs/test/doc/html/utf/testing-tools/reference.html
-
 #define BOOST_TEST_MAIN
 #define BOOST_TEST_MODULE "Check Tools Test Suite"
 #define BOOST_LIB_DIAGNOSTIC "on"// Show library file details.
-// Linking to lib file: libboost_unit_test_framework-vc100-mt-gd-1_47.lib (trunk at 12 Jun 11)
 
 #include <iostream>
 #include <iomanip>
@@ -84,4 +81,4 @@
   BOOST_CHECK ( size_expected::reach_one_past_the_end(6) );
   BOOST_CHECK ( !no_size_expected::reach_one_past_the_end(6) );
 
-}
\ No newline at end of file
+}


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