Boost logo

Boost Users :

Subject: Re: [Boost-users] [Smart Ptr] Why is weak_ptr a _ptr?
From: Dave Abrahams (dave_at_[hidden])
Date: 2010-10-13 10:13:37


On Wed, Oct 13, 2010 at 5:42 AM, Szymon Gatner <szymon.gatner_at_[hidden]> wrote:
> Hi,
>
> Is it just me or is it really the worse naming in whole boost library?
>
> It is nothing like any other smart pointer.
>
> No initialization / construction from raw pointer.
>
> No operator * or -> (the very least one would expect from _ptr class).
>
> No get().
>
> And many more which I now forgot. My point is that is is not a pointer
> at all, not even a bit. It only happens to have a member variable returning
> one and that is hardly a reason to call type pointer-like.
>
> It should rather be called shared_tracker or shared_listener or something
> in that taste ;)

It's not just you. But it's that way for hysterical reasons. The
first versions did have operator* and operator->, IIRC.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

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