Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-01-21 09:58:05

"Bronek Kozicki" <brok_at_[hidden]> wrote in message:

> (being quite useless) it's still valid. Please note that deleter
> always receive static-type == dynamic-type, when used properly (ie.
> smart pointer intialized directly with raw pointer).

I still don't agree with this. Can you explain why the following is an
improper use?

    // Library function; returns a pointer to a newly allocated
derived class.
    shape* create_shape(const std::string& description);

    // User code:
    mov_ptr<Shape> p(create_shape("fuzzy dog"));

The static type is Shape*, but the dynamic type may be BorderCollie*.

Or are you now restricting your remarks to arrays?


Boost list run by bdawes at, gregod at, cpdaniel at, john at