Cast vector to vector

后端 未结 5 2053
-上瘾入骨i
-上瘾入骨i 2020-11-30 08:31

I have a member variable of type vector (where is T is a custom class, but it could be int as well.) I have a function from which I want to return a po

5条回答
  •  遥遥无期
    2020-11-30 09:20

    If you have a const vector you cannot modify the container, nor can you modify any of the elements in the container. You don't need a const vector to achieve those semantics.

提交回复
热议问题