Boost logo

Boost :

From: Gennaro Prota (gennaro.prota_at_[hidden])
Date: 2008-07-09 04:33:13


Hi,

I had a summary look at the changes made to Boost.Inspect (since I
last saw it) and noticed a few issues:

* the "*A*" marker is used either for broken links, invalid urls etc.
   *and* non-ASCII chars

* "non-ASCII" itself looks like a misleading name: see the string
   gPunct, defined in ascii_check.cpp

* non portable (though widely portable :-)) code:

       if ( c >= 'a' && c <= 'z' ) return false;
       if ( c >= 'A' && c <= 'Z' ) return false;
       if ( c >= '0' && c <= '9' ) return false;

   If there aren't problems with standard library support I'd suggest
   replacing the above with

       if ( std::isalnum( static_cast< int >( c ),
                          std::locale::classic()
                        )
          )

   Similarly for the subsequent isspace-like tests

* again in ascii_check.cpp there's some scaffolding to get a line
   number from a file position; this is needed in other inspector
   classes as well, and is done much differently. I think it is
   worth unifying this part and make it available in one place

-- 
Genny

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk