From: Ed Brey (brey_at_[hidden])
Date: 2001-04-11 17:42:04
From: "David Abrahams" <abrahams_at_[hidden]>
> Maybe we could just move the pragmas outside the class definition.
Sure does. See the last paragraph below.
> From: "Ed Brey" <brey_at_[hidden]>
> > I recently tried upgrading my project's library to use the latest
> > version of smart_ptr, and unfortunately, the pragmas that were added
> > suppress a spurious warning are triggering an internal compiler
> > VC6.5. VC claims the line causing the problem is operator* in
> > shared_ptr.
> > The project is including smart_ptr.hpp in a precompiled header (and
> > would be nice to keep it there), although the error doesn't occur
> > a different translation unit is compiled and the template is
> > instantiated. The program doesn't instantiate scoped_ptr;
> > might also share the same fate.
> > It doesn't matter whether incremental compilation is turned on or
> > the error occurs either way.
> > Removing the pragmas around operator-> from the scoped_ptr and
> > shared_ptr classes and instead placing them at to the beginning and
> > of the file (right after the #includes and right before the final
> > #endif) solves the problem. It seems that VC is somehow getting
> > confused when it sees pragmas within a class definition.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk