Is there any way to rename the first and second accessor functions of a map iterator. I understand they have these names because of the underlying pair which represents the
You can't rename the members, but you can have some functions to help.
inline Vertex& vertex(map::iterator& it) {return it->first;} inline Edge& edge(map::iterator& it) {return it->second;}
Then, instead of it->vertex like you want, you can do vertex(it)
it->vertex
vertex(it)