Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2008-08-15 19:24:42

on Fri Aug 15 2008, Niels Dekker - mail address until 2008-12-31 <> wrote:

>> The name swap_using_adl, besides that not everyone knows
>> the acronym "adl", makes it less obvious whether it
>> can find the generic std::swap implementation
>> (through 'using' not ADL).
> Indeed, you're right. I was actually considering to spell it out:
> swap_using_argument_dependent_lookup(T&,T&).

IMO, the person reading the code shouldn't be burdened with the
mechanical details (e.g. ADL) of how the function works.

> But do you have a better suggestion? What about just renaming the
> function to "call_swap(T&,T&)"? Because that's what it does: it just
> calls the most appropriate swap function.

Or, you might say that it "swaps" its arguments. Hey, maybe we should
call it swap(T&,T&)!

> Anyway, its name is not that important,

I think the name is important.

Dave Abrahams
BoostPro Computing

Boost list run by bdawes at, gregod at, cpdaniel at, john at