[Regex] MSVC 2008 (VC9) fails to compile regex_raw_buffer.hpp on 1_49
I get an error just including regex.hpp in a program that used to work on earlier VC versions.
1>c:\boost\include\boost-1_49\boost\regex\v4\regex_raw_buffer.hpp(184) : error C2665: 'operator new' : none of the 6 overloads could convert all the argument types
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\new(57): could be 'void *operator new(size_t,void *) throw()'
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\new(86): or 'void *operator new(size_t,const std::nothrow_t &) throw()'
1> while trying to match the argument list '(const char [64], long)'
1>c:\boost\include\boost-1_49\boost\regex\v4\perl_matcher_non_recursive.hpp(110) : error C2059: syntax error : '*'
inline raw_storage::raw_storage(size_type n)
{
start = end = static_cast<pointer>(::operator new(n)); <--- offending line for first error
BOOST_REGEX_NOEH_ASSERT(start)
last = start + n;
}
struct save_state_init
{
saved_state** stack;
save_state_init(saved_state** base, saved_state** end)
: stack(base)
{
*base = static_cast
I looked to see if this was a known failure but apparently missed it if it was already covered. It is probably not a Boost problem. The earlier versions were compiled on 32 bit systems and this is a 64 bit system (Win7). I assume I have probably missed some configuration item to make this work. I am fairly certain I did compile this before under VC9 on a 32 bit system (Vista). (Boost was built from source on this system and this compiler.)
Stumped here, that code has been that way since the beginning of regex, could there be some mixup in your include paths? Grappling in the dark yours, John.
It is an include order problem although I don't know specific issue yet. I moved the include for regex.hpp up front and the error went away. Thanks John. Larry -----Original Message----- From: John Maddock Sent: Sunday, February 24, 2013 11:30 AM To: boost-users@lists.boost.org Subject: Re: [Boost-users] [Regex] MSVC 2008 (VC9) fails tocompileregex_raw_buffer.hpp on 1_49
I looked to see if this was a known failure but apparently missed it if it was already covered. It is probably not a Boost problem. The earlier versions were compiled on 32 bit systems and this is a 64 bit system (Win7). I assume I have probably missed some configuration item to make this work. I am fairly certain I did compile this before under VC9 on a 32 bit system (Vista). (Boost was built from source on this system and this compiler.)
Stumped here, that code has been that way since the beginning of regex, could there be some mixup in your include paths? Grappling in the dark yours, John. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
AMDG On 02/24/2013 11:19 AM, Larry wrote:
It is an include order problem although I don't know specific issue yet. I moved the include for regex.hpp up front and the error went away.
The issue is that new is #defined somewhere. The definition is (approximately) #define new new(__FILE__, __LINE__) Look at the arguments in the error message:
1>c:\boost\include\boost-1_49\boost\regex\v4\regex_raw_buffer.hpp(184) : error C2665: 'operator new' : none of the 6 overloads could convert all the argument types 1> while trying to match the argument list '(const char [64], long)'
In Christ, Steven Watanabe
Thanks Steven. I just haven't tracked down where the #define is yet. Moving the #include "fixed" it for the moment but I will wade through the various includes to track down the #define. Doing a #define for new() is not something I would do. Larry -----Original Message----- From: Steven Watanabe Sent: Monday, February 25, 2013 11:34 AM To: boost-users@lists.boost.org Subject: Re: [Boost-users] [Regex] MSVC 2008 (VC9) fails tocompileregex_raw_buffer.hpp on 1_49 AMDG On 02/24/2013 11:19 AM, Larry wrote:
It is an include order problem although I don't know specific issue yet. I moved the include for regex.hpp up front and the error went away.
The issue is that new is #defined somewhere. The definition is (approximately) #define new new(__FILE__, __LINE__) Look at the arguments in the error message:
1>c:\boost\include\boost-1_49\boost\regex\v4\regex_raw_buffer.hpp(184) : error C2665: 'operator new' : none of the 6 overloads could convert all the argument types 1> while trying to match the argument list '(const char [64], long)'
In Christ, Steven Watanabe _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (3)
-
John Maddock
-
Larry
-
Steven Watanabe