
The following test program doesn't work like I would expect. #include <iostream> #include <string> #include <boost/spirit/core.hpp> int main () { using namespace std; using namespace boost::spirit; typedef rule<scanner<string::iterator> > rule_t; string s; s += char(0x81); cout << (char(0x80) < char(0xFF)) << endl; rule_t test = range_p(0x80, 0xFF); // (*) parse_info<string::iterator> info = parse(s.begin(), s.end(), test); if (info.hit) cout << "Hit!" << endl; else cout << "Not hit." << endl; return 0; } This is the program output. [pedro@localhost http_client]$ $HOME/.local/gcc-3.4.4/bin/g++ -g -I ../../../.. -Wall -Wextra test.cpp -fsigned-char && ./a.out 1 Not hit. [pedro@localhost http_client]$ $HOME/.local/gcc-3.4.4/bin/g++ -g -I ../../../.. -Wall -Wextra test.cpp -funsigned-char && ./a.out 1 Hit! [pedro@localhost http_client]$ $HOME/.local/gcc-3.4.4/bin/gcc -v Reading specs from /home/pedro/.local/gcc-3.4.4/lib/gcc/i686-pc-linux-gnu/3.4.4/specs Configured with: ../configure --prefix=/home/pedro/.local/gcc-3.4.4 --enable-languages=c,c++ Thread model: posix gcc version 3.4.4 -- Pedro LamarĂ£o