C++箴言:谨慎使用多继承

来源:王朝搜索
 
C++箴言:谨慎使用私有继承

在《C++箴言:确保公开继续模拟“is-a”》一文中论述了 C++ 将 public inheritance(公有继续)视为一个 is-a 关系。

C++箴言:谨慎使用多继承

触及 multiple inheritance (MI)(多继续)的时候,C++ 社区就会鲜明地分裂为两个基本的阵营。一个阵营认为假如 single inheritance (SI)(单继续)是有

C++箴言:谨慎使用私有继承

作者: fatalerror99         出处:BLOG 在《C++箴言:确保公开继承模拟“

C++箴言:谨慎使用模板元编程

template metaprogramming (TMP)(模板元编程)是写 template-based(基于模板)的运行于编译期间的 C++ 程序的过程。考虑一下:一个 template m

翻译:Effective C++, 3rd Edition, Item 40: 谨慎使用 multiple inheritance(多继承)

Item 40: 谨慎使用 multiple inheritance(多继承) 作者: 译者: 发布: 触及 multiple inheritance (MI)(多继承)的时候,C++ 社区就会鲜明地

翻译:Effective C++, 3rd Edition, Item 40: 谨慎使用 multiple inheritance(多继承)

Item 40: 谨慎使用 multiple inheritance(多继承) 作者: 译者: 发布: 触及 multiple inheritance (MI)(多继承)的时候,C++ 社区就会鲜明地

C++箴言:确保公开继承模拟“is-a”

在 Some Must Watch While Some Must Sleep (W. H. Freeman and Company, 1974) 这本书中,William Dement 讲述了一

C++箴言:避免覆盖通过继承得到的名字

莎士比亚有一个关于名字的说法。"What’s in a name?" 他问道,"A rose by any other name would smell as sweet."(语出《罗密欧与朱丽叶

C++箴言:接口继承和实现继承

(public) inheritance 这个表面上简单易懂的观念,一旦被近距离审阅,就会被证实是由两个相互独立的部分组成的:inheritance of function interfaces(

C++箴言:使用对象管理资源

假设我们和一个投资(例如,股票,债券等)模型库一起工作,各种各样的投资形式从一个根类 Investment 派生出来: class Investment { ... }; // root cla

 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
© 2005- 王朝网络 版权所有