
-----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
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?