id summary reporter owner description type status milestone component version severity resolution keywords cc 6253 lex::lexertl::generate_static_dfa compiler errors if lexer has wchar_t as underlying stream type Ryan Molden Hartmut Kaiser "Try and compile the following code, you will get compiler errors because generate_static.hpp has one line which says a std::map has a element type of char when, in this case, it should be wchar_t. After fixing that to use Char (which is an existing template param on the method with the error) the output C++ code from this method further encodes 'char' in a number of places thus compiling a lexer using the produced static table also fails. <--------------------- Begin Repro ------------------------------> #include #include #include #include #include using namespace std; using namespace boost::spirit; template struct MyLexer : boost::spirit::lex::lexer { MyLexer() { token = L""Yay winning!""; this->self = token; } lex::token_def token; }; int main(int argc, char* argv[]) { typedef lex::lexertl::token token_type; typedef lex::lexertl::lexer lexer_type; MyLexer lexer; ofstream outputStream(""test.hpp""); return lex::lexertl::generate_static_dfa(lexer, outputStream, ""test"") ? 0 : -1; }" Bugs closed To Be Determined spirit Boost 1.47.0 Problem fixed generate_static_dfa lexertl