Boost logo

Boost :

From: Phil Endecott (spam_from_boost_dev_at_[hidden])
Date: 2007-07-04 12:39:35


Jake Voytko wrote:"
> On 7/4/07, Phil Endecott <spam_from_boost_dev_at_[hidden]> wrote:
>> Jake Voytko wrote:
>> > plot_range(my_plot, data.begin(), data.end(),
>> > default_functor, human_age,
>> > circle,
>> > orange, red,
>> > 3, 10);
>>
>> It would be great to be able to write just 'data' in place of
>> 'data.begin(), data.end()'. Is there anything stopping this?
>
> The STL algorithm functions are used as the basis here, and it carries all
> of the same benefits.

..and the same disadvantage, namely verbosity in the common case. I'm
only suggesting that passing the whole container should be available as
an alternative, not instead of the begin-end pair. I seem to recall
that making the STL algorithms accept whole containers has been
proposed, but the only thing I can find now is the item
"Container-based algorithms" at
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1901.html.
Maybe someone else knows what I'm thinking of?

Phil.


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