$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r76908 - sandbox/SOC/2011/checks/boost/checks
From: pierre.talbot.6114_at_[hidden]
Date: 2012-02-06 09:36:41
Author: trademark
Date: 2012-02-06 09:36:41 EST (Mon, 06 Feb 2012)
New Revision: 76908
URL: http://svn.boost.org/trac/boost/changeset/76908
Log:
Reverted to previous working version.
Removed:
   sandbox/SOC/2011/checks/boost/checks/lexical_filter.hpp
Text files modified: 
   sandbox/SOC/2011/checks/boost/checks/amex.hpp         |    21 +--------------------                   
   sandbox/SOC/2011/checks/boost/checks/basic_checks.hpp |    31 -------------------------------         
   sandbox/SOC/2011/checks/boost/checks/visa.hpp         |     2 +-                                      
   sandbox/SOC/2011/checks/boost/checks/weight.hpp       |     6 +++---                                  
   4 files changed, 5 insertions(+), 55 deletions(-)
Modified: sandbox/SOC/2011/checks/boost/checks/amex.hpp
==============================================================================
--- sandbox/SOC/2011/checks/boost/checks/amex.hpp	(original)
+++ sandbox/SOC/2011/checks/boost/checks/amex.hpp	2012-02-06 09:36:41 EST (Mon, 06 Feb 2012)
@@ -1,5 +1,5 @@
 //  Boost checks/amex.hpp header file
-//  (C) Copyright Pierre Talbot 2011 - 2012
+//  (C) Copyright Pierre Talbot 2011
 //  Distributed under the Boost Software License, Version 1.0. (See
 //  accompanying file LICENSE_1_0.txt or copy at
 //  http://www.boost.org/LICENSE_1_0.txt
@@ -63,25 +63,6 @@
   }
 };
 
-template <std::size_t checkdigit_size>
-struct amex_filter
-{
-  std::size_t value_pos;
-
-  amex_filter() : value_pos(0){}
-
-  template <typename value_type>
-  bool operator()(const value_type &x)
-  {
-    const unsigned int real_pos_from_left = AMEX_SIZE - value_pos - checkdigit_size;
-
-    if(real_pos_from_left == 1 && x != 3)
-      throw std::invalid_argument("The Major Industry Identifier of an American Express should be 3!");
-    else if(real_pos_from_left == 2 && x != 4 && x != 7)
-      throw std::invalid_argument("The Issuer Identification Number of an American Express should be 34 or 37!");
-  }
-};
-
 /*!
   \brief This is the type of the Amex algorithm for validating a check digit.
 */
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-02-06 09:36:41 EST (Mon, 06 Feb 2012)
@@ -23,37 +23,6 @@
 namespace boost {
   namespace checks{
 
-template <typename binary_function, typename counter_type>
-struct counter_increaser
-{
-  binary_function &f;
-  counter_type &c;
-
-  counter_increaser(binary_function &f, counter_type &c) : f(f), c(c) {}
-
-  std::size_t operator()(std::size_t value, std::size_t checksum)
-  {
-    checksum = f(value, checksum);
-    ++c;
-    return checksum;
-  }
-};
-
-template <typename binary_function,
-          typename seq_iterator>
-std::size_t checksum(seq_iterator begin, seq_iterator end, binary_function &checksum_operation)
-{
-  return std::accumulate(seq_begin, seq_end, std::size_t(), checksum_operation);
-}
-
-template <typename binary_function,
-          typename counter_type,
-          typename seq_iterator>
-std::size_t checksum(seq_iterator begin, seq_iterator end, binary_function &checksum_operation, counter_type &counter)
-{
-
-}
-
 
 namespace detail
 {
Deleted: sandbox/SOC/2011/checks/boost/checks/lexical_filter.hpp
==============================================================================
--- sandbox/SOC/2011/checks/boost/checks/lexical_filter.hpp	2012-02-06 09:36:41 EST (Mon, 06 Feb 2012)
+++ (empty file)
@@ -1,40 +0,0 @@
-//  Boost checks/lexical_filter.hpp header file  ------------------------------------//
-//  (C) Copyright Pierre Talbot 2012
-//  Distributed under the Boost Software License, Version 1.0. (See
-//  accompanying file LICENSE_1_0.txt or copy at
-//  http://www.boost.org/LICENSE_1_0.txt
-//  See http://www.boost.org for updates, documentation, and revision history.
-
-/*! \file
-    \brief Provides functions specific for checking sequences.
-std::ptr_fun to use all the cctype header functions.
-*/
-
-#ifndef BOOST_CHECKS_LEXICAL_FILTER_HPP
-#define BOOST_CHECKS_LEXICAL_FILTER_HPP
-
-#ifdef _MSC_VER
-    #pragma once
-#endif
-
-#include <functional>
-#include <cctype>
-
-namespace boost{
-  namespace checks{
-
-
-/* Check if character is decimal digit plus the special character 'X' (often occurs 
-as check digit instead of 10).
-*/
-template <typename value_type>
-bool isdigitx(const value_type &x)
-{
-  return isdigit(x) || x == 'x' || x == 'X';
-}
-
-  
-}} // namespace boost  namespace checks
-
-
-#endif // BOOST_CHECKS_LEXICAL_FILTER_HPP
\ No newline at end of file
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-02-06 09:36:41 EST (Mon, 06 Feb 2012)
@@ -101,7 +101,7 @@
     \throws std::invalid_argument if the first digit(from the leftmost)doESn't match the Visa pattern.
     \throws boost::checks::translation_exception if the check digit cannot be translated into the checkdigit type.
 
-    \returns The check digit. The check digit its in the range [0..9].
+    \returns The check digit. The check digit is in the range [0..9].
 */
 template <typename check_range>
 typename boost::range_value<check_range>::type compute_visa(const check_range& check_seq)
Modified: sandbox/SOC/2011/checks/boost/checks/weight.hpp
==============================================================================
--- sandbox/SOC/2011/checks/boost/checks/weight.hpp	(original)
+++ sandbox/SOC/2011/checks/boost/checks/weight.hpp	2012-02-06 09:36:41 EST (Mon, 06 Feb 2012)
@@ -52,10 +52,10 @@
   template<BOOST_PP_ENUM_PARAMS(weight_size , int weight_value)> \
   struct weight<BOOST_PP_ENUM_PARAMS(weight_size, weight_value)> \
   { \
-    static int at(const unsigned int value_pos) \
+    static int weight_associated_with_pos(const unsigned int value_pos) \
     { \
-      static const int weights[weight_size] = { BOOST_PP_ENUM_PARAMS(weight_size, weight_value) }; \
-      return weights[value_pos % weight_size]; \
+      static const int weights[weight_size] = { BOOST_PP_ENUM_PARAMS(weight_size, weight_value) } ; \
+      return weights[value_pos % weight_size] ; \
     } \
   } ;