Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-02-08 13:43:36


From: "hugo_duncan" <hugo.duncan_at_[hidden]>
> weak_ptr looks to be very useful, but I am having problems compiling
operator-> and operator* on bcc32.
>
> The following code does not compile
>
> #include "boost/weak_ptr.hpp"
> #include <cassert>
>
> class X
> {
> public:
> int a;
> };
>
>
> void weak_ptr_test()
> {
> boost::shared_ptr<X> x;
> boost::weak_ptr<X> y(x);
> assert(x->a==y->a);
> assert((*x).a==(*y).a);
> }
>
>
>
> The error messages are:
>
> Error E2451 c:\usr\boost\boost/weak_ptr.hpp 120: Undefined symbol 'T' in
function weak_ptr<X>::operator ->() const

Yes, very annoying, thanks for the bug report. 'T' needs to be
'element_type' for Borland. CVS updated.


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