$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2008-06-24 09:26:48
Dean Michael Berris wrote:
> Almost does it, but not necessarily. Constructing an instance of the
> transform iterator would require the instantiation of the
> counting_iterator as well.
>
> template <class ResultType, class InputType>
> struct generator {
> typedef transform_iterator<
> function<ResultType(InputType)>, counting_iterator<InputType>
> > iterator;
> typedef iterator const const_iterator;
>
> iterator begin() {
> return make_transform_iterator(
> counting_iterator<InputType>(), _function
> );
> };
> [...]
By using ranges instead of iterators, you can get that container-like
behaviour (grouping of begin and end).
However counting_range doesn't seem to be implemented yet.