$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r71404 - trunk/boost/math/special_functions
From: pbristow_at_[hidden]
Date: 2011-04-21 13:53:59
Author: pbristow
Date: 2011-04-21 13:53:58 EDT (Thu, 21 Apr 2011)
New Revision: 71404
URL: http://svn.boost.org/trac/boost/changeset/71404
Log:
Added more comments
Text files modified: 
   trunk/boost/math/special_functions/nonfinite_num_facets.hpp |    27 +++++++++++++++------------             
   1 files changed, 15 insertions(+), 12 deletions(-)
Modified: trunk/boost/math/special_functions/nonfinite_num_facets.hpp
==============================================================================
--- trunk/boost/math/special_functions/nonfinite_num_facets.hpp	(original)
+++ trunk/boost/math/special_functions/nonfinite_num_facets.hpp	2011-04-21 13:53:58 EDT (Thu, 21 Apr 2011)
@@ -43,12 +43,12 @@
     const int signed_zero = 0x2; //!< put facet will distinguish between positive and negative zero.
     const int trap_infinity = 0x4; /*!< put facet will throw an exception of type std::ios_base::failure
        when an attempt is made to format positive or negative infinity.
-       get will set the fail bit of the stream when an attempt is made 
+       get will set the fail bit of the stream when an attempt is made
        to parse a string that represents positive or negative sign infinity.
     */
     const int trap_nan = 0x8; /*!< put facet will throw an exception of type std::ios_base::failure
        when an attempt is made to format positive or negative NaN.
-       get will set the fail bit of the stream when an attempt is made 
+       get will set the fail bit of the stream when an attempt is made
        to parse a string that represents positive or negative sign infinity.
        */
 
@@ -195,7 +195,7 @@
       explicit nonfinite_num_get(int flags = 0) : flags_(flags)
       {}
 
-    protected:
+    protected:  // float, double and long double versions of do_get.
       virtual InputIterator do_get(
         InputIterator it, InputIterator end, std::ios_base& iosb,
         std::ios_base::iostate& state, float& val) const
@@ -276,7 +276,8 @@
       } // void get_signed
 
       template<class ValType> void get_unsigned
-      ( // get an unsigned value into val
+      ( //! Get an unsigned floating-point value into val,
+        //! but checking for letters indicating non-finites.
         InputIterator& it, InputIterator end, std::ios_base& iosb,
         const std::ctype<CharType>& ct,
         std::ios_base::iostate& state, ValType& val
@@ -297,7 +298,7 @@
           get_q(it, end, ct, state, val);
           break;
 
-        default:
+        default: // Got a normal floating-point value into val.
           it = std::num_get<CharType, InputIterator>::do_get(
             it, end, iosb, state, val);
           if((flags_ & legacy) && val == static_cast<ValType>(1)
@@ -346,7 +347,7 @@
       } // void get_i
 
       template<class ValType> void get_n
-      ( // Get expected strings after 'n', "nan", "nanq", "nans", "nan(...)" 
+      ( // Get expected strings after 'n', "nan", "nanq", "nans", "nan(...)"
         InputIterator& it, InputIterator end, const std::ctype<CharType>& ct,
         std::ios_base::iostate& state, ValType& val
       ) const
@@ -384,7 +385,7 @@
               return;
             }
             ++it;
-            break;  // "nan(...)" 
+            break;  // "nan(...)"
           }
 
         default:
@@ -500,7 +501,7 @@
       //..........................................................................
 
       char peek_char
-      ( // Return next char (from input buffer).
+      ( //! \return next char in the input buffer, ensuring lowercase (but do not 'consume' char).
         InputIterator& it, InputIterator end,
         const std::ctype<CharType>& ct
       ) const
@@ -510,7 +511,9 @@
       }
 
       bool match_string
-      ( // Match remaining chars to expected string (case insensitive).
+      ( //! Match remaining chars to expected string (case insensitive),
+        //! consuming chars that match OK.
+        //! \return true if matched expected string, else false.
         InputIterator& it, InputIterator end,
         const std::ctype<CharType>& ct,
         const char* s
@@ -519,14 +522,14 @@
         while(it != end && *s && *s == ct.narrow(ct.tolower(*it), 0))
         {
           ++s;
-          ++it;
+          ++it; //
         }
         return !*s;
-      } //  char peek_char
+      } // bool match_string
 
     private:
       const int flags_;
-    }; // 
+    }; //
 
     //------------------------------------------------------------------------------