[Boost-bugs] [Boost C++ Libraries] #2458: 1.36.0 Regex will not compile under MSVC 8.0

Subject: [Boost-bugs] [Boost C++ Libraries] #2458: 1.36.0 Regex will not compile under MSVC 8.0
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-10-31 23:33:43


#2458: 1.36.0 Regex will not compile under MSVC 8.0
--------------------------+-------------------------------------------------
 Reporter: anonymous | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: Boost 1.37.0 | Component: regex
  Version: Boost 1.36.0 | Severity: Problem
 Keywords: |
--------------------------+-------------------------------------------------
 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.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2458>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:59 UTC