Can I have polymorphic containers with value semantics in C++?

后端 未结 9 1413
半阙折子戏
半阙折子戏 2020-12-02 18:35

As a general rule, I prefer using value rather than pointer semantics in C++ (ie using vector instead of vector). Usuall

9条回答
  •  遥遥无期
    2020-12-02 19:02

    Just to add one thing to all 1800 INFORMATION already said.

    You might want to take a look at "More Effective C++" by Scott Mayers "Item 3: Never treat arrays polymorphically" in order to better understand this issue.

提交回复
热议问题