阅读背景:

是否可以从STL容器继承实现,而不是委托?

来源:互联网 

I have a class that adapts std::vector to model a container of domain-specific objects. I want to expose most of the std::vector API to the user, so that he/she may use familiar methods (size, clear, at, etc...) and standard algorithms on the container. This seems to be a reoccurring pattern for me in my designs:I have a class that adapts std::vector to model




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: