boost::array< pair<>, maxsize >::iterator and adaptor

H

Hicham Mouline

Hello,
I have a boost::array< pair<type1, type2>, maxsize > object, and I wish to
iterate over the list of type1 elements,
and the list of type2 elements...

I gather I then need an iterator adaptor based on array's iterator and
const_iterators...
How can I write such a thing?

rds,
 
H

Hicham Mouline

Hicham Mouline said:
Hello,
I have a boost::array< pair<type1, type2>, maxsize > object, and I wish to
iterate over the list of type1 elements,
and the list of type2 elements...

I gather I then need an iterator adaptor based on array's iterator and
const_iterators...
How can I write such a thing?

rds,
The solution is to used boost::transform_iterator<> as suggested by Steven
Watanabe,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top