Boost logo

Boost :

From: Rainer Deyke (root_at_[hidden])
Date: 2002-01-13 10:47:31


----- Original Message -----
From: "David Abrahams" <david.abrahams_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Saturday, January 12, 2002 7:48 PM
Subject: Re: [boost] Loki SmartPtr questions

>
> ----- Original Message -----
> From: "Rainer Deyke" <root_at_[hidden]>
>
> > This would not be a major issue for a rarely used function, but I
have
> > found that I tend to make extensive use of
'boost::shared_ptr::get'.
> > I would not like to replace every instance of 'p.get()' with
> > 'boost::GetImplPtr(p)' or something equally long.
>
> argument-dependent lookup says that you can just write:
>
> get(p)
>
> See the Boost.Function library for a precedent:
>
> pointer(p)

I don't like using argument-dependent lookup. It's hard to read
(since you can't tell which function is actually called just by
looking at the code) and can create some fairly subtle bugs.

--
Rainer Deyke (root_at_[hidden])
Shareware computer games           -           http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor

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