Renaming first and second of a map iterator

后端 未结 8 1737
北恋
北恋 2020-12-14 02:41

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

8条回答
  •  甜味超标
    2020-12-14 02:59

    Sure, reimplement or wrap iterator, but is it worth the effort? Wouldn't

    Vertex& v = it->first;
    

    be easier?

提交回复
热议问题