Boost logo

Boost :

Subject: Re: [boost] [XInt] review
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-03-10 20:28:34


AMDG

On 03/10/2011 04:54 PM, Chad Nelson wrote:
> On Thu, 10 Mar 2011 13:08:32 -0800
> Steven Watanabe<watanabesj_at_[hidden]> wrote:
>> (On that note, it's generally a good idea to use (f)(x) or xint::f(x)
>> instead of f(x) unless you intend f to be a customization point).
> Sorry, you lost me. Would all function calls need that?

Only calls to free functions.

> If not, which
> ones is it limited to?

Basically, this disables argument dependent
lookup, so it should be used whenever ADL
would be triggered and you do not explicitly
want ADL. Looking through you code again,
I think I was a bit hasty in suggesting this.
I didn't see any cases where it would actually
be important, because your functions all
take your own types. Even if you get an
extra overload from a user's namespace,
your overloads should always be a better
match. I still think that it's better to block
ADL whenever possible, but in practice, I
don't do so consistently, and most people
don't worry about it.

In Christ,
Steven Watanabe


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