Boost logo

Boost Users :

Subject: Re: [Boost-users] [shared_ptr] Cannot include shared_ptr.hpp in a Visual Studio .Net 2003 managed C++ file
From: Daniel Krügler (dsp_at_[hidden])
Date: 2008-10-06 05:25:47


Alice Johnson wrote:
> When I include <boost/shared_ptr.hpp> in a file that has Compile as Managed
> set to Assembly support (/clr), I get:
> error C2373: 'InterlockedIncrement' : redefinition; different type modifiers
>
> C:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\PlatformSDK\Include\WinBase.h(1298) : see declaration of
> 'InterlockedIncrement'
>
> I started with boost version 1.34.1, but have also tried 1.35.0 and 1.36.0
>
> Is there any solution to this?

I'm not aware of one - /CLR is not officially supported by boost.
Personally I hit about some severe problems in the context of
CLR and there is not solution in sight. One of the real nasty things
is a defect in the conversion of pointer-to-member to bool -
which is the canonical way to check smart pointers:

http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=339523

Greetings from Bremen,

Daniel Krügler


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net