I have tried the #pragma optimize and it doesn't resolve my problem :(. Although, that would had been a clean solution.

On 4/19/06, Sohail Somani < s.somani@fincad.com> wrote:
> -----Original Message-----
> From: boost-users-bounces@lists.boost.org
> [mailto:boost-users-bounces@lists.boost.org] On Behalf Of
> Michael Fawcett
> Sent: Wednesday, April 19, 2006 10:09 AM
> To: boost-users@lists.boost.org
> Subject: Re: [Boost-users] [weak_ptr] thread safe?
>
> On 4/19/06, John Wilkinson < jwilkinson@tsystem.com> wrote:
> > There is a pragma in VC6 that will activate or deactivate
> optimization.
> > It can be used to wrap optimization-sensitive blocks of
> code.  I do not
> > remember what it is, though, and I do not have VC6 handy.
> I have used
> > it, and it did alleviate an optimization-related bug.
>
> >From the MSDN:
>
> #pragma optimize( "[optimization-list]", {on | off} )
>
> Specifies optimizations to be performed on a function-by-function
> basis. The optimize pragma must appear outside a function and takes
> effect at the first function defined after the pragma is seen. The on
> and off arguments turn options specified in the optimization-list on
> or off.

I'm curious, why couldn't this be a compiler workaround in weak_ptr?
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users



--
Alain Cormier
alain.work@gmail.com
Alain.Cormier@USherbrooke.CA
job   : +1 (450) 679-9542 x238
cell. : +1 (514) 730-1394