Boost logo

Boost :

Subject: Re: [boost] [explore] Library Proposal: Container Streaming
From: Zachary Turner (divisortheory_at_[hidden])
Date: 2009-11-30 17:42:34


On Mon, Nov 30, 2009 at 4:37 PM, John Bytheway
<jbytheway+boost_at_[hidden]<jbytheway%2Bboost_at_[hidden]>
> wrote:

> Jeffrey Faust wrote:
> > Jeffrey Bosboom wrote:
> >> As a technical question, how are the operators found? They can't be
> >> added to std (adding to std is undefined behavior), and there's
> >> otherwise no one namespace to put them in that will allow them to be
> >> found for all element types (at least with my understanding of ADL).
> >
> > The operators are added to namespace std, and they are found through
> > ADL. I don't know how to make this work otherwise.
>
> You could put them in the global namespace? I think that would conform
> better to the letter of the rules, without really being any safer in
> practice.

I'd rather put them in a library specific namespace in that case, and
require the programmer to put a using declaration in the translation unit.


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