[spirit][regex] rxstrlit/regex_p with wchar_t strings

View: New views
1 Messages — Rating Filter:   Alert me  

[spirit][regex] rxstrlit/regex_p with wchar_t strings

by Ben.Hanson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>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

Please post to the spirit group - I'm not registered with the boost group as the number of messages emailed in overwhelming.

Hartmut, let me know if we need to talk about this one.

Regards,

Ben