Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-11-10 11:44:58


John Maddock wrote:

> Some boost header includes <boost/shared_ptr.hpp>
> .... includes <memory> and finds the Boost.TR1 version
> .... Tries to include shared_ptr.hpp and associated headers, but
> gets no actual contents because we're within the shared_ptr include
> guards, but haven't actually declared anything yet.
>
> I thought I had managed to get this working by forward-declaring the
> contents of shared_ptr.hpp, weak_ptr.hpp etc in the TR1 header, and
> this
> does actually work on some compilers (VC++ for example). However on
> other "stricter" compilers (gcc is the prime example), the compiler
> chokes on the declaration of weak_ptr, because some of it's data
> members are still incomplete types at the time weak_ptr.hpp gets
> included (which is after shared_ptr.hpp is included, but *before*
> it's contents get fully declared.

What are the exact errors that you get?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk