Boost logo

Boost :

From: Wyss, Felix (felixw_at_[hidden])
Date: 2002-02-12 17:17:16


What about is_null()?

Felix

-----Original Message-----
From: Darin Adler [mailto:darin_at_[hidden]]
Sent: Tuesday, February 12, 2002 15:18
To: Boost
Subject: Re: [boost] more comments on new weak_ptr

On 2/12/02 12:04 PM, "Peter Dimov" <pdimov_at_[hidden]> wrote:

> I don't mind removing the boolean weak_ptr queries and/or operator->, if
> that's proves a popular opinion. They are there mostly because having used
> shared_ptr, users will expect to find them in weak_ptr, too. Explaining why
> operator* isn't there is easy: it isn't thread safe, but the others are.

I think having fewer operations helps make the purpose of weak pointer
clearer. If the only thing you can do is turn one back into a strong
pointer, it becomes difficult to misuse one, and more clear what they are
for. And if a check for 0 is helpful for efficiency, we can try to choose a
name that makes it clear that false negatives are possible but false
positives are not, rather than leaving it unnamed, easy to invoke by
accident, and perhaps overpromising.

    -- Darin

Info: http://www.boost.org Send unsubscribe requests to: <mailto:boost-unsubscribe_at_[hidden]>

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/


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