Boost logo

Boost :

From: Trevor Perrin (tperrin_at_[hidden])
Date: 2001-03-02 18:09:34


So I can convert a raw pointer A to a pointer-to-const B below. Is there a
way to tweak things so you can assign a shared_ptr C to a
shared_ptr-to-const D? Under VC6sp4 I get:

error C2440: 'initializing' : cannot convert from 'class
boost::shared_ptr<int>' to 'class boost::shared_ptr<int const >'
        No constructor could take the source type, or constructor overload
resolution was ambiguous

Which seems right.

int* A = new int;
const int* B = t;

shared_ptr<int> C = new int;
shared_ptr<const int> D =p1;


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