[1.35.0][xpressive] INVALID_REGULAR_EXPRESSION - why?

Hi!
The following piece of code used to compile with previous versions of boost:
using namespace boost::xpressive;
sregex path_delimiter = '/';
Now it bails out on VC8 SP1 with (beautified output):
------ Build started: Project: XXXX, Configuration: Release Win32
------ Compiling... MainFrm.cpp
MY_PATH_TO_BOOST\boost_1_35_0\boost/xpressive/proto/matches.hpp(356) :
error C2825: 'Expr': must be a class or namespace when followed by '::'
MY_PATH_TO_BOOST\boost_1_35_0\boost/xpressive/detail/static/grammar.hpp(317)
: see reference to class template instantiation
'boost::proto::result_of::matches

Markus Werle wrote:
Hi!
The following piece of code used to compile with previous versions of boost:
using namespace boost::xpressive; sregex path_delimiter = '/';
Now it bails out on VC8 SP1 with (beautified output):
<snip>
What went wrong?
Changing the code to sregex path_delimiter = sregex::compile("/");
fixes the issue for me, but I missed this change in the release notes ...
There is an ambiguity here: // What does this do? sregex rx = '$'; You may have meant: // Zero-width match at the end of the line sregex rx = sregex::compile("$"); Or you may have meant: // Match a literal '$' character sregex rx = as_xpr('$'); Rather than guess what you mean, it's now an error and you have to say which. I simply forgot I made this change, which is why it's not in the release notes. -- Eric Niebler Boost Consulting www.boost-consulting.com

Eric Niebler
Or you may have meant:
// Match a literal '$' character sregex rx = as_xpr('$');
Rather than guess what you mean, it's now an error and you have to say which. I simply forgot I made this change, which is why it's not in the release notes.
So if I simply wnat to use "/" as separator for tokenisation I have to say as_xpr here, right? Markus
participants (2)
-
Eric Niebler
-
Markus Werle