26 iterator優於const_iterator、reverse_iteratorj及const_reverse_iterator

有些版本的insert和erase函數要求使用iterator。如果你需要調用這些函數,那麼必須使用iterator。const和reverse型的迭代器不能滿足這些函數要求。 要想隱式將一個const_iterator轉換成iterator式不可能的 從reverse_iterator轉換而來的iterator在使用前需要調整。 如下圖:
相關文章
相關標籤/搜索