jeudi 14 juin 2018

How I need to return the value from "operator->()" in this case? "const" or "non-const"?

If I want to implement operator->() for class of iterator (non-const), what is the correct way for returning the value?
const T* or T* ? (while T is the type of any element in my array..)

Aucun commentaire:

Enregistrer un commentaire