摘要: template class visibility{public: void say(double d){};private: void say(int i){}; void say(T t){};};int _tmain(int argc, _TCHAR* argv[]){ visibil... 阅读全文
posted @ 2015-03-07 19:28 嗨皮龙 阅读(2360) 评论(0) 推荐(1) 编辑
摘要: void function() {}A a;void main{ ::atexit(function); A b;};次序如下:1 实例 b 的析构函数 # main 里面的实例的析构函数2 --- main 函数返回---3 function() ... 阅读全文
posted @ 2015-03-07 19:08 嗨皮龙 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 1 class faux 2 { 3 public: 4 template 5 virtual void do() // member function templates cannot be virtual 6 {} 7 }; 8 ... 阅读全文
posted @ 2015-03-07 19:05 嗨皮龙 阅读(1361) 评论(0) 推荐(1) 编辑
摘要: 0) 首先讨论一下 cache line 索引定位的方式。 给定一个 32 位虚拟地址,怎么定位 cache line 呢? 答案是 VIPT (virtual indexed, physical taged), 即以虚拟地址作为 cache line 的 set 的索引,物理地址作为 ... 阅读全文
posted @ 2015-03-07 18:48 嗨皮龙 阅读(748) 评论(0) 推荐(0) 编辑
摘要: 0) 背景 有个静态库叫做 slib.lib, 其中包含两个 obj 文件: expofunc1.obj |- void sayHello1() { printf("Hello 1\n"); } |- void sayWorld1() {} expofunc... 阅读全文
posted @ 2015-03-07 18:32 嗨皮龙 阅读(498) 评论(0) 推荐(0) 编辑