Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-12-29 14:50:59

David Abrahams wrote:
> 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.

Actually, I'm already implementing the read and write operations this way, and
considered using this as a point of customization, but decided it would
complicate the code too much.

I think I'll just eliminate this point of customization altogether.


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