// This testcase demonstrates an issue with Wave's processing of raw string literals #include #include #include #include #include #include #include #include typedef boost::wave::cpplexer::lex_token<> cpplexer_token_t; typedef boost::wave::cpplexer::lex_iterator cpplexer_iterator_t; int main() { // test delimiters std::string cppstr = "R\"###(\nSome Text)\"\n)###\""; auto cbeg = cppstr.begin(); auto cend = cppstr.end(); using namespace boost::wave; // works cpplexer_iterator_t beg(cbeg, cend, cpplexer_token_t::position_type("fake.cpp"), language_support(support_cpp0x)); cpplexer_iterator_t end; std::cout << "source string: |" << cppstr << "|\n"; for (auto tok = beg; tok != end; ++tok) { std::cout << ID_FROM_TOKEN(*tok) << " |" << tok->get_value() << "| "; } std::cout << "\n"; }