|
Boost : |
From: Victor A. Wagner, Jr. (vawjr_at_[hidden])
Date: 2002-06-21 16:34:20
I've been assuming that
boost::shared_ptr<int> p;
did what you wanted
At Friday 2002/06/21 07:04, you wrote:
>Hello all,
>
>I have a problem with MSVC6 and shared_ptr. The compiler
>is hopelessly confused by the template constructor:
>
>template<typename Y> explicit shared_ptr(Y * p)
>
>As a result, it fails to compile:
>
>boost::shared_ptr<int> p(0);
>
>Therefore I suggest the following modification:
>
>#ifdef BOOST_NO_MEMBER_TEMPLATES
>
>explicit shared_ptr(T * p): px(p), pn(p, checked_deleter<T>(), p) // Y
>must be complete
>{
>}
>
>#else
>
>template<typename Y>
>explicit shared_ptr(Y * p): px(p), pn(p, checked_deleter<Y>(), p) // Y
>must be complete
>{
>}
>
>#endif
>
>Comments, anyone?
>
>Markus
>
>
>_______________________________________________
>Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Victor A. Wagner Jr. http://rudbek.com
PGP RSA fingerprint = 4D20 EBF6 0101 B069 3817 8DBF C846 E47A
PGP D-H fingerprint = 98BC 65E3 1A19 43EC 3908 65B9 F755 E6F4 63BB 9D93
The five most dangerous words in the English language:
"There oughta be a law"
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk