摘要: 首先,任何虚拟基类的构造函数按照它们被继承的顺序构造; 其次,任何非虚拟基类的构造函数按照它们被继承的顺序构造; 最后,任何成员对象的构造函数按照它们声明的顺序调用; 阅读全文
posted @ 2016-06-07 17:49 略加思索的河马 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 1. 函数模板 普通函数 void Swap(int &, int &); 模板函数 template void Swap(T &, T &); 显示具体化,下面两个等价 template void Swap(int &, int &); template void Swap(int &, int &); 注意:具体化将覆盖模板函数,普通函数将覆盖具体化和模板函数。 ... 阅读全文
posted @ 2016-05-07 17:36 略加思索的河马 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 在比较这两个模式之前,我们首先的搞明白几个概念,什么是阻塞和非阻塞,什么是同步和异步。 同步和异步是针对应用程序和内核的交互而言的。 同步是指用户进程触发IO操作并等待或者轮询的去查看IO操作是否就绪, 异步是指用户进程触发IO操作之后便开始做自己的事情,而当IO操作已经完成的时候会得到IO完成的通 阅读全文
posted @ 2016-04-15 11:35 略加思索的河马 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-04-07 21:16 略加思索的河马 阅读(238) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-04-06 16:04 略加思索的河马 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 1.activemq-cpp下载地址: http://activemq.apache.org/cms/download.html 2.相关依赖库 http://mirrors.hust.edu.cn/apache/apr/ apr,apr-iconv,apr-util(版本号都找最高的,不要一高一低 阅读全文
posted @ 2016-03-19 19:11 略加思索的河马 阅读(682) 评论(0) 推荐(0) 编辑
摘要:   阅读全文
posted @ 2016-03-13 21:19 略加思索的河马 阅读(414) 评论(0) 推荐(0) 编辑
摘要: const int MaxObjectNum = 10; template <typename T> class ObjectPool { template <typename... Args> using Constructor = std::function<std::shared_ptr<T> 阅读全文
posted @ 2016-03-12 00:15 略加思索的河马 阅读(864) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <string> using namespace std; template <typename T> void PrintT(T& t) { cout << "lvalue" << endl; } template <typename T> 阅读全文
posted @ 2016-03-09 18:36 略加思索的河马 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 1. 下载gdb 7.6.1源码包 http://ftp.gnu.org/gnu/gdb/gdb-7.6.1.tar.gz 将源码包放在home目录的Download目录中 2. 解压缩gdb 7.6.1源码包 cd /root/Downloads/ tar -zxvf gdb-7.6.1.tar. 阅读全文
posted @ 2016-03-08 15:46 略加思索的河马 阅读(2044) 评论(0) 推荐(1) 编辑