On 06/05/2011 04:03, Eric Niebler wrote:
On 5/5/2011 8:59 PM, Louis Lavery wrote:
[snip]
What version of MSVC is this?
Visual C++ 2008 express
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.
I've tried this...
#pragma warning(disable:4996)
#include
int main()
{
using namespace boost::xpressive;
sregex rex = as_xpr("foo");
return 0;
}
...which, with langauge extensions enabled, gives one warning...
c:\boost_1_45_0\boost\proto\expr.hpp(98) : warning C4701: potentially
uninitialized local variable 'that' used
...which refers to this function...
template
Expr make_terminal(T const(&t)[N], Expr *, proto::term *)
{
Expr that;
for(std::size_t i = 0; i < N; ++i)
{
that.child0[i] = t[i];
}
return that;
}
...at the top of the file contain that function is...
///////////////////////////////////////////////////////////////////////////////
/// \file expr.hpp
/// Contains definition of expr\<\> class template.
//
// Copyright 2008 Eric Niebler. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_PROTO_EXPR_HPP_EAN_04_01_2005
#define BOOST_PROTO_EXPR_HPP_EAN_04_01_2005
...I don't know if that gives you a clue as to what version I have.
But the boost I have is in directory boost_1_45_0 (I don't remember if I
created that directory or the install script) and the documentation is
for release 1.45.0.
Apart from the C4701 warning (which I can suppress for now) it seems
happy compiling stuff like this...
sregex rex = as_xpr("foo") >> _d >> "xyz";
...so long as I enable language extensions and use the pragma.
I'm happy with this for now as I expect to move on to vc++ 2010 in the
near future. Although I'd like to know if it's necessary to enable
language extensions with later versions of the compiler, do you know?
Thanks for you help, and for xpressive.
Louis.