Const-correctness with getters of vector of non-pointers
I have a quick question regarding const-correctness for getters of vector of non-pointers. Basically, I have this class with a non-const getter and a const getter for m_Vertices: class Mesh { public: std::vector<Vertex>& GetVertices() { return m_Vertices; } const std::vector<Vertex>& GetVertices() const { return m_Vertices; } private: std::vector<Vertex> m_Vertices; } The non-const getter makes sense… Read More Const-correctness with getters of vector of non-pointers