会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
朱小勇
博客园
园子
首页
新随笔
联系
管理
订阅
上一页
1
···
29
30
31
32
33
34
35
36
37
···
133
下一页
2022年3月13日
C++-std::is_same
摘要: 1、 bool isInt = std::is_same<int, int>::value; //为true std::cout << std::is_same<int, int32_t>::value << '\n'; // true std::cout << std::is_same<int,
阅读全文
posted @ 2022-03-13 14:13 朱小勇
阅读(253)
评论(0)
推荐(0)
2022年3月11日
C++14相比C++11多了的功能
摘要: 1、C++14多了std::make_unique 2、C++14用auto推导函数返回值时,不需要使用decltype来配合使用
阅读全文
posted @ 2022-03-11 16:07 朱小勇
阅读(454)
评论(0)
推荐(0)
C++-std::result_of
摘要: 1、 int fun(int x) { return x + 1; } std::result_of<fun(int)>::type d = 100; // int
阅读全文
posted @ 2022-03-11 14:55 朱小勇
阅读(245)
评论(0)
推荐(0)
2022年3月9日
C++-std::deque
摘要: xxxx
阅读全文
posted @ 2022-03-09 15:40 朱小勇
阅读(39)
评论(0)
推荐(0)
C++-std::list
摘要: 什么是链表【forward_list,list..】 链表是一种物理存储单元上非连续、非顺序的存储结构,数据元素的逻辑顺序是通过链表中的指针链接次序实现的。 链表由一系列结点(链表中每一个元素称为结点)组成,结点可以在运行时动态生成。每个结点包括两个部分:一个是存储元素的数据,另一个就是指向下一个节
阅读全文
posted @ 2022-03-09 15:39 朱小勇
阅读(141)
评论(0)
推荐(0)
什么时候需要加锁
摘要: 1、设计单个对象的时候,不用加锁 因为我在设计一个类对象的时候,并不知道其他人会怎么使用这个对象,可能会单线程使用,也可能多线程,如果我们不分青红皂白就直接加锁,那可能性能直接下降许多 2、对多个对象进行管理的时候,需要加锁 如果我们使用容器对多个数据进行管理的时候,最好加锁 3、对基本数据不用加锁
阅读全文
posted @ 2022-03-09 11:20 朱小勇
阅读(601)
评论(0)
推荐(0)
2022年3月6日
Qt使用三方库
摘要: 1、dll文件 LIBS +=-L$$PWD -lmydll 2、a文件 LIBS +=-L$$PWD -lmylib LIBS +=$$PWD/mylib.a
阅读全文
posted @ 2022-03-06 23:42 朱小勇
阅读(121)
评论(0)
推荐(0)
C++11关键字decltype
摘要: 1、作用 选择并返回操作数的数据类型 2、使用 int A(); int main(void) { int tempA = 2; /*1.testA为int*/ decltype(tempA) testA; /*2.testB为int,并不调用A()*/ decltype(getSize()) te
阅读全文
posted @ 2022-03-06 22:54 朱小勇
阅读(45)
评论(0)
推荐(0)
C++线程池
摘要: https://www.cnblogs.com/lzpong/p/6397997.html
阅读全文
posted @ 2022-03-06 22:52 朱小勇
阅读(74)
评论(0)
推荐(0)
Boost使用线程池
摘要: 1、首先需要编译安装boost【QT】 https://www.cnblogs.com/judes/p/11027830.html 2、下载线程池源码 http://threadpool.sourceforge.net/ 3、解压 4、将上面框出的文件复制到Qt目录 5、配置pro DEPENDPA
阅读全文
posted @ 2022-03-06 21:32 朱小勇
阅读(1017)
评论(0)
推荐(0)
上一页
1
···
29
30
31
32
33
34
35
36
37
···
133
下一页
公告