Boost logo

Boost Users :

From: me22 (me22.ca_at_[hidden])
Date: 2006-06-07 23:15:41


On 6/7/06, Gottlob Frege <gottlobfrege_at_[hidden]> wrote:
> IIRC, one of boost's smart ptrs can be used with an incomplete type. How is
> the compile of the destructor delayed?
>
As I understand it, it's a consequence of allowing custom deleters.

The destructor knows that it will call a boost::function-type thing on
the pointer, but only needs the signature of that. The actual deleter
is set on construction of the shared_ptr, at which point the type is
complete.

~ Scott McMurray


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