Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-12-29 11:40:14

Peter Dimov wrote:
> Jonathan Turkanis wrote:
>> The occurence of boost::io::put in the above example has to be
>> qualified, since otherwise it will refer to the member function being
>> defined.
> What I have to say has nothing to do with namespaces or directory placement,
> but...
> Given that in the documentation you speak of user-defined overloads of
> boost::io::read et al, it might be worthwhile to point out that two-phase
> lookup will not see these user overloads. If you want to have an overload
> customization point in a template, you have to use an unqualified call. And
> choose the identifiers wisely. :-)

Of course, overloading isn't always the best approach (it introduces
nasty ADL and complicated resolution rules), so consider using a static
member of a class template that can be specialized, instead.

Dave Abrahams
Boost Consulting

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