C++学习
xiaolifeidaofirst
好好学习,天天向上
展开
-
c++ future/ promise/ packaged_task/ async
c++并发原创 2022-09-15 15:50:17 · 182 阅读 · 0 评论 -
windows下的dll lib .a之间的区别
windows下的dll lib .a之间的区别原创 2022-08-27 23:25:33 · 1250 阅读 · 0 评论 -
new 、operator new 和 placement new 区别
new :不能被重载,其行为总是一致的。它先调用operator new分配内存,然后调用构造函数初始化那段内存。 operator new:要实现不同的内存分配行为,应该重载operator new,而不是new。 delete和 new 类似。 delete首先调用对象的析构函数,然后调用operator delete释放掉所使用的内存。 placement new:只是operator new重载的一个版本。它并不分配内存,只是返回指向已经分配好的某段内存的...原创 2022-03-25 10:51:22 · 318 阅读 · 0 评论 -
c++ template
模板加宏,法力无穷 /// remove_const template<typename _Tp> struct remove_const { typedef _Tp type; }; template<typename _Tp> struct remove_const<_Tp const> { typedef _Tp type; }; /// remove_volatile templat.原创 2022-03-03 10:35:45 · 439 阅读 · 1 评论