随笔分类 -  c++

C++元编程和Boost编程库 (C++ Metaprogramming and Boost MPL )上部
摘要:http://blog.csdn.net/hityct1/article/details/4189851 阅读全文

posted @ 2011-11-10 09:24 katago 阅读(388) 评论(0) 推荐(0) 编辑

RAII惯用法:C++资源管理的利器
摘要:http://blog.csdn.net/monkey_d_meng/article/details/6037644 阅读全文

posted @ 2011-09-15 17:04 katago 阅读(161) 评论(0) 推荐(0) 编辑

构造函数和析构函数中的异常
摘要:构造函数和析构函数中的异常 2008-11-29 21:39 ... 阅读全文

posted @ 2011-09-15 15:01 katago 阅读(981) 评论(0) 推荐(0) 编辑

构造和析构异常
摘要:http://blog.csdn.net/jixingzhong/article/details/1844531 构造函数异常,可以总结如下: 1.C++中通知对象构造失败的唯一方法那就是在构造函数中抛出异常; 2.构造函数抛出异常时,析构函数将不会被执行; 3.抛出异常时,其子对象将被逆序析构。(参考析构过程) 析构函数异常相对要复杂一些,存在一种冲突状态,程序将直接崩溃:异... 阅读全文

posted @ 2011-09-15 15:00 katago 阅读(235) 评论(0) 推荐(0) 编辑

构造函数异常测试
摘要:http://www.cplusplus.com/doc/tutorial/ #include <iostream> #include <exception> using namespace std; class MyTest_Base { public: MyTest_Base (string name = "") : m_name(name) { ... 阅读全文

posted @ 2011-09-15 14:54 katago 阅读(291) 评论(0) 推荐(0) 编辑

Multiple dispatch
摘要:http://en.wikipedia.org/wiki/Multiple_dispatchIn "conventional", i.e. single dispatch, object-oriented programming languages, when you invoke a method ("send a message" in Smalltalk, "call a member function" in C++) one of its arguments is treated specially and used to 阅读全文

posted @ 2011-09-13 14:56 katago 阅读(310) 评论(0) 推荐(0) 编辑

表达式模板 (C++学习)
摘要:http://blog.csdn.net/dbzhang800/article/details/6693454 Qt从4.6开始,引入了一个QStringBuilder的内部类 在QString的Manual中,你可以找到关于它的简单介绍 在String concatena... 阅读全文

posted @ 2011-08-23 19:01 katago 阅读(497) 评论(0) 推荐(0) 编辑

Visual C++ 8.0对象布局的奥秘:虚函数、多继承、虚拟继承
摘要:http://cplusplus.wikidot.com/cn:vc8-object-layout-secret Visual C++ 8.0对象布局的奥秘:虚函数、多继承、虚拟继承 STL扩展库»C++惯用手法(C++ Tips)» Visual C++ 8.0对象布局的奥秘:虚函数、多继承、虚拟继承 ... 阅读全文

posted @ 2011-08-23 18:53 katago 阅读(339) 评论(0) 推荐(0) 编辑

chapter2 techniques ---- 2.2 partial template specialization
摘要:template <class Window, class Controller> class Widget { ... generic implementation ... }; template <> class Widget<ModalDialog, MyController> { ... specialized implementation ... }; // Partial spec... 阅读全文

posted @ 2011-08-17 11:05 katago 阅读(298) 评论(0) 推荐(0) 编辑

迭代器失效问题
摘要:条款9:在删除选项中仔细选择 我们必须保证在调用erase之前就得到了c中下一元素的迭代器。最容易的方法是当我们调用时在i上使用后置递增: AssocContainer<int> c;...for (AssocContainer<int>::iterator i = c.begin(); // for循环的第三部分 i != c.end(); // 是空的;i现在在下面 /*nothing*/ ... 阅读全文

posted @ 2011-03-21 14:06 katago 阅读(246) 评论(0) 推荐(0) 编辑

C++ template Day Day Up 第二天 模板参数推论(deduction)
摘要:C++ template Day Day Up 第二天 模板参数推论(deduction) 收藏 Today’s subject is Compile Argument Deduction. 我们平时用template的时候往往需要指定template argument type,实际上很多种情况可以不指定具体的类型,而依赖于编译器的deduction(个人推荐把这个单词翻译成推论,能表达出实际的... 阅读全文

posted @ 2011-03-01 16:24 katago 阅读(537) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示