Because such calls would never go to a more derived class than that of currently executing construtor or destructor. In other word, it would call the version of base class rather than that of derived classes. For example, if you have a base transaction class to log the buy and sell transactions, you may code like this

class Transaction {
public:
Transaction() {
...
logTransaction();
}
virtual void logTransaction();
}; class BugTransaction() : public Transaction {
public:
virtual void logTransaction() const {
...
}
};

  

If you write code like that, you highly possible debug to hell to find out why your derived class method are never called.

最新文章

  1. WPF中通过代码设置控件的坐标
  2. springMVC之<context:annotation-config />标签
  3. Android Studio快捷键每日一练(4)
  4. DedeCms文档关键词替换,优先替换长尾关键词
  5. JPA查询语句(转载)
  6. am335x 更改调试串口
  7. AS3垃圾回收整理
  8. Frequent values
  9. ionic2 使用 cordova 打包成安卓apk
  10. ReactiveCocoa_v2.5 源码解析之架构总览
  11. PCL+VS2010环境配置
  12. IndexedDB,FileSystem- 前端数据库,文件管理系统
  13. 【JDK1.8】JUC——AbstractQueuedSynchronizer
  14. Python进阶之面向对象编程
  15. Linux常用命令——关机重启命令
  16. Debian Nginx 下载 .apk 文件时候报 403 错误 [1]
  17. CSS 简介、 选择器、组合选择器
  18. boost 编写finger服务
  19. Spring (一)
  20. 尚学堂java 参考答案 第七章

热门文章

  1. checkbox显示选中内容个数
  2. WebService一些概念
  3. VS Code - Debugger for Chrome调试js
  4. Spring4.* 中整合 Hibernate
  5. 温故而知新 $ jquery选择器居然隐藏第二个参数,更进一步限制选择的区域
  6. 转 springboot 监控点 简介
  7. HDU 1016:Prime Ring Problem
  8. Virtex6 PCIe 超简版基础概念学习(二)
  9. maven使用deploy发布到本地仓库
  10. Django Model获取指定列的数据