Opened 14 years ago

Closed 14 years ago

#2458 closed Bugs (fixed)

1.36.0 Regex will not compile under MSVC 8.0

Reported by: anonymous Owned by: John Maddock
Milestone: Boost 1.37.0 Component: regex
Version: Boost 1.36.0 Severity: Problem
Keywords: Cc:

Description

I get the following error (repeated several times) when I build the boost libraries using MSVC 8.0 (8.0.50727.42):

...failed compile-c-c++ bin.v2\libs\regex\build\msvc-8.0\debug\link-static\threading-multi\wc_regex_traits.obj... compile-c-c++ bin.v2\libs\regex\build\msvc-8.0\debug\link-static\threading-multi\usinstances.obj usinstances.cpp libs\regex\src\..\src\usinstances.cpp(55) : error C2375: 'std::allocator<_Ty>::allocator' : redefinition; different link age

with [

_Ty=unsigned short

] C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\xmemory(120) : see declaration of 'std::allocator<_Ty>::al

locator'

with [

_Ty=unsigned short

]

libs\regex\src\..\src\usinstances.cpp(55) : error C3190: 'std::allocator<_Ty>::allocator(void) throw()' with the provide d template arguments is not the explicit instantiation of any member function of 'std::allocator<_Ty>'

with [

_Ty=unsigned short

]

Commenting out the line:

template _CRTIMP2 allocator<unsigned short>::allocator();

where it appears in usinstances.cpp and workaround.hpp seems to solve the problem. In the MSVC definition of this function, it includes "throw()", which causes the conflict.

Change History (2)

comment:1 by john@…, 14 years ago

Should be wc_regex_changes.cpp, not workaround.hpp.

comment:2 by John Maddock, 14 years ago

Resolution: fixed
Status: newclosed

I believe this is fixed in Trunk.

Alternatively installing VC8 service pack 1 will fix the issue.

Note: See TracTickets for help on using tickets.