Boost logo

Boost :

From: Simon Buchan (simon_at_[hidden])
Date: 2005-10-13 03:19:38

David Abrahams wrote:
> Lewis Hyatt <lhyatt_at_[hidden]> writes:
>>The idea is to define a template class,
>>template<typename Iterator> class first_iterator_t {
>> Iterator pair_iter;
>> first_iterator_t(Iterator const&);
>> /*...*/
>>which overloads operator*() and operator->() to access the element named
>>"first" of the object returned by Iterator::operator*(). (With something
>>analagous for second_iterator_t.) A function named first_iterator()
>>provides a convenient creation function a-la std::make_pair().
> Sounds like a job for transform_iterator.
transform_iterator<(&_1)->first, Iterator>?

Interesting, it could save me a couple of lines here and there... (every
little bit helps)

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