> Have you seen some structure like this before? Can you think of a way
> to make the iterator behave like a regular stl iterator?

Typing this I realized a way to do it: Have first and second in
FakePair be references. That way operator-> can return it by value,
but anyone using it will access the elements in the vector.

The structure still looks strange, but at least the code using it
looks the same as when using a stl container. Do you think I should
try to generalize this structure?

Cheers,
Rafael

Attachment: t.patch
Description: Binary data

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to