Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-03-22 10:54:13


From: "David Abrahams" <david.abrahams_at_[hidden]>
> It seems to me that some things are missing. For example, shouldn't the
> element_type typedef be mentioned in the common requirements? I also
> imagine that things like operator->() could be mentioned there.
>
> Also, in the following sentence, we appear to have the implicit
> assumption that a class template is instantiated "all at once", whereas
> (as I understand things) that's seldom the case:
>
> "T may be an incomplete type at the point of smart pointer declaration.
> Unless otherwise specified, it is required that T be a complete type at
> points of smart pointer instantiation"
>
> Don't we mean to say that T is required to be complete at the point
> where its destructor is needed (which is the instantiation point of the
> smart pointer constructor in the case of shared_ptr).

I agree that the common requirements section doesn't cover the new
shared_ptr well - feel free to improve it. :-) However note that there are
other methods that do not need to destroy T but still need a complete type:
*_array's operator[], for instance.


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