|
Boost : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2001-12-03 08:26:28
brangdon_at_[hidden] wrote:
> On Mon, 12 Nov 2001 09:23:41 -0000 Vladimir Prus (ghost_at_[hidden]) wrote:
> > There are two problems, good solutions for which I'm yet to hear:
> > [name clashes between sequence and iterator versions]
>
> I guess we have to put the sequence algorithms into their own namespace.
This is embarassing/inelegant. Consider writing
container_algorithms::sort(.....), and repeating that prefix in everywhere....
OTOH, provided there's no "using namespace std" somewhere, you can say
"using namespace container_algorithms" and enjoy. I'm not sure....
> > 2. What will you do about mutating algorithms?
> > [Binding temporaries to non-const references]
>
> In my view, sequence objects should be mutable in much the same way that
> iterators are mutable. They should not be passed by reference. Then there
> is no problem with temporaries.
In this case, directly passing vector to an algorithm is very inefficient.
- Volodya
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk