参考:C++11 并发指南系
原创 2022-12-15 22:55:17
139阅读
c++ 11 引入了大量的新特性,这其中包括 语法糖、跨平台通用组件的封装 以及 一些独特的 “新东西”。此系列主要作为本人的个人心得笔记,也作为参考资料,主要罗列 c++ 11 ~ c++ 20的一些特性。 主要参考资料:c++ reference : ​​https://en.cppreference.com/w/​​
原创 2022-09-23 13:45:01
59阅读
Chapter 1 Deducing Types Item 1: Understand template type deduction. Item 2: Understand auto type deduction. Item 3: Understand decltype. Ite...
转载 2014-12-10 16:53:00
292阅读
Chapter 1 Deducing Types Item Item 3: Understand declt
原创 2023-06-09 16:29:44
94阅读
atomic库的底层也是有锁的,仅
原创 2022-09-23 13:42:08
103阅读
Variable: The symbolic name of a quantity of data so that the name can be used to access the data it refers to throughout the scope of the code where it is defined. In C++, “variable” is g
原创 2013-01-30 16:02:37
761阅读
C++ library headers <algorithm> <iomanip> <list> <ostream> <streambuf>
原创 2024-06-26 15:52:31
44阅读
有两种对象构造方法,一是在指定内存上构造对象,另一个是先构造一个临时对象,然后把对象拷贝到指定内存上。
原创 2024-07-09 10:39:35
51阅读
C++ -Standardshttp://open-std.org/JTC1/SC22/WG21/docs/standards
原创 2022-09-23 13:55:31
97阅读
tuple 几乎允许所有常用的构造方式:赋值、拷贝、移动,完全可以当做 基本类型使用,不要有任何心理负担。make_tuple 不
原创 2022-09-23 13:34:09
64阅读
在这个模板中,我们不知道我们操纵的容器的类型是什么,那意味着我们同样不知道它使用的索引对象(index objects)的类型,对一个未知类型的对象使用传值通常会造成不必要的拷贝,对程序的性能有极大的影响,还会造成对象切片行为(参见。exp只是一个普通的表达式,它可以是任意复杂的形式,但必须保证exp的结果是有类型的,不能是void;
原创 11月前
55阅读
代码:#include <iostream>#include <
原创 2022-09-23 13:49:12
70阅读
使用条件变量可以模拟 Event:#ifdef WIN32 HANDLE
原创 2022-09-23 13:47:43
316阅读
代码片段:std::mutex mut;std::queue<data_chunk> data_queue;std::condition_variable data_cond;void data_preparation_thread(){ wh
原创 2022-09-23 13:35:41
116阅读
用法一:使用可调用对象#include <iostream>#include <thread>#include <Windows.h>using namespace std;template <typen
原创 2022-09-23 13:35:47
173阅读
constexpr 是 c++ 11 引入的关键字,用来在编译阶段运行一些语句和函数,从而在编译阶段就能为常量赋值。如果某些常量的值需要运合运算。
原创 2024-06-13 10:57:59
96阅读
Morgan Stanley uses Apache Kafka® to publish market data to internal clients and to persist it for replay purposes. We started out using librdkafka’s
转载 2021-05-15 13:43:00
360阅读
2评论
北京时间2016年1月9日10:31:06。正式開始翻译。水平有限,各位看官若有觉得不妥之处,请批评指正。 之前已经有人翻译了前几个条目,有些借鉴出处:
转载 2017-07-10 14:53:00
125阅读
2评论
引言c++ 11开始引入了对个可调用对象,比如 lambda,std的指针。
原创 2022-09-23 13:55:24
199阅读
class my_class;my_class& get_my_class_instance(){ static my_class instance; return instance;}c++ 11之前无法保证static 变量线程安全,c++ 11之后是线程安全的。
原创 2022-09-23 13:35:29
98阅读
  • 1
  • 2
  • 3
  • 4
  • 5