Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5807: Debug build of the program asserts calling iscntrl(c) in boost::spirit::detail::token_printer_debug_for_chars::print(), with c == -127
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-08-23 14:39:47
#5807: Debug build of the program asserts calling iscntrl(c) in
boost::spirit::detail::token_printer_debug_for_chars::print(), with c ==
-127
------------------------------------------------------+---------------------
Reporter: Stephen Torri <stephen.torri@â¦> | Owner: djowel
Type: Bugs | Status: new
Milestone: To Be Determined | Component: spirit
Version: Boost 1.47.0 | Severity: Problem
Resolution: | Keywords:
------------------------------------------------------+---------------------
Comment (by anonymous):
I changed boost/spirit/home/support/attributes.hpp at line 950 to be:
else if ( c >= 0 && c < 127 && iscntrl(c))
o << "\\" << std::oct << static_cast<int>(c);
I read that the windows api expects that to be a value within the range of
0x00 - 0x1F or 0x7F despite the fact that the input parameter type for
that function is a regular integer. The linux api also uses a int. So we
cannot rely on the type checking to save us here. We have to constrain the
range of values for 'c' to be within the range of 0 and 126.
Stephen
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5807#comment:1> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:07 UTC