Opened 12 years ago

Closed 11 years ago

#4678 closed Bugs (fixed)

VS2010 intrin.h not compatible with interlocked.hpp

Reported by: yuehuang <yuehuang@…> Owned by: Peter Dimov
Milestone: To Be Determined Component: smart_ptr
Version: Boost 1.44.0 Severity: Problem
Keywords: Intrin.h Interlocked.hpp Cc:

Description

A customer has openned an Micrsoft Connect bug for the compatibility of VS2010 and Boost. The user states that including intrin.h and boost\detail\interlocked.hpp whiling passing fastcall or stdcall switch to the compiler, the compiler would generate an redefinition error.

d:\boost\boost_1_44_0\boost\detail\interlocked.hpp(61): error C2373: '_InterlockedCompareExchange' : redefinition; different type modifiers
       c:\program files (x86)\microsoft visual studio 10.0\vc\include\intrin.h(214) : see declaration of '_InterlockedCompareExchange'

In VS2010, intrin.h has changed to match calling convention that of WinBase.h.

Would defining BOOST_USE_WINDOWS_H workaround the issue?

Thanks

Felix

Change History (4)

comment:1 by Ion Gaztañaga, 12 years ago

Owner: changed from Ion Gaztañaga to Peter Dimov

Reasigning to Peter Divmo, author of interlocked.hpp

comment:2 by Peter Dimov, 12 years ago

Component: interprocesssmart_ptr
Status: newassigned

comment:3 by Peter Dimov, 11 years ago

(In [75396]) Use <intrin.h> for VS2010+. Refs #4678.

comment:4 by Peter Dimov, 11 years ago

Resolution: fixed
Status: assignedclosed

(In [75757]) Merge [75396] to release. Fixes #4678.

Note: See TracTickets for help on using tickets.