|
Boost : |
From: David B. Held (dheld_at_[hidden])
Date: 2002-07-31 12:39:14
"Philippe A. Bouchard" <philippeb_at_[hidden]> wrote in message
news:ai8ooh$dml$1_at_main.gmane.org...
> [...]
> so I'll go back to my mutable_ptr<int> where sorts are not
> necessary... like with configuration files...
Well, that's fine if you just need to put pointers in a container, and can
deal with the risks associated with mutable_ptr<>. But that doesn't
allow for sharing of the pointer.
> I was great talking to you people. I learned much and I hope it is
> reciprocal for the reinforcement of your arguments.
You didn't seem to spend much time exploring generic wrapper
solutions. Those will preserve your sizeof(ptr<T>) == sizeof(T*)
requirement while not requiring T to be directly derived from a
counter. And it should work polymorphically, if done correctly. This
is something that is not in Boost, and could possibly be very useful.
And there are certainly opportunities for optimization. ;) Furthermore,
a good generic count wrapper could work with any number of different
smart pointers. Consider it.
Dave
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk