Boost logo

Boost Users :

Subject: Re: [Boost-users] xpressive
From: Eric Niebler (eric_at_[hidden])
Date: 2011-05-05 23:03:52


On 5/5/2011 8:59 PM, Louis Lavery wrote:
> I'm trying to get started with boost xpressive, but have problems with
> this simple attempt...
>
> #pragma warning(disable:4180) // MSVC: qualifier applied to function
> type has no meaning; ignored
> #pragma warning(disable:4224) // MSVC: nonstandard extension used :
> formal parameter 'value' was previously defined as a type
> #pragma warning(disable:4996) // MSVC: 'std::transform' was declared
> deprecated

Do you really need these pragmas? 'std::transform' was declared
deprecated? If you're really seeing this warning, something might be
wrong with your setup.

> #include <boost/xpressive/xpressive_static.hpp>
>
> void f()
> {
> using namespace boost::xpressive;
>
> sregex rex = as_xpr('k');
> }
>
> ...which gives these errors...
>
>
> ------ Build started: Project: miscTest, Configuration: Debug Win32 ------
> Compiling...
> main.cpp
> c:\boost_1_45_0\boost\xpressive\detail\static\transforms\as_matcher.hpp(27)
> : error C2146: syntax error : missing ';' before identifier 'data_type'

<snip>

What version of MSVC is this?

I'm sorry, I can't reproduce this error on trunk. Are you really using
Boost 1.45.0 like the error message suggests? I'm attempting to download
it now, but I'm on a slow, unreliable connection. It could be a while.

Can you try this regex:

  sregex rex = as_xpr("foo");

That's xpressive's very first test case. I guarantee when 1.45.0 went
out the door, this regex worked with every version of MSVC above 7.0.

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com

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