|
Boost Users : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-05-13 14:48:15
From: "Andrew R. Thomas-Cramer" <artc_at_[hidden]>
>
> > > On MSVC6, it produces errors when class T has an implicit destructor,
but
> > compiles without error otherwise.
> >
> > Seems to work for me; coud you post an example?
>
> I'm using boost 1.27 and MSVC6.0. Here's example code, followed by the
compiler
> error:
[...]
This is a compiler-specific error, I believe; MSVC 6 doesn't like deleting
const pointers. You can use
shared_ptr<T const> p = shared_ptr<T>(new T);
The new release has a templated constructor so
shared_ptr<T const> p(new T);
works as-is.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net