|
Boost Users : |
Subject: [Boost-users] [spirit][regex] rxstrlit/regex_p with wchar_t strings
From: Adam Badura (abadura_at_[hidden])
Date: 2009-10-28 02:45:14
Is it possible to use rxstrlit/regex_p with wide character strings
(wchar_t based)? Or even better, with arbitrary char type/char traits pair?
I tried this with suggested example
(http://www.boost.org/doc/libs/1_40_0/libs/spirit/classic/example/fundamental/regular_expression.cpp)
and after converting to wchar_t what was required and compiling it run
successfully. But it generated a lot of warnings about converting wchar_t to
char in headers that looked like regex headers. So I guess it worked only
because the wchar_ts in the example are actually chars. If I changed the
example to use wchar_t which have no corresponding char values the example
would likely fail.
In the end I have a string with templated char type and traits type
(just like with string and iostream library). And I want to match it against
grammar build from (among others) strings with the same char type and traits
type. Can I force regex in Spirit to do that?
Adam Badura
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net