摘要: 一、std..function #include <iostream> #include <future> #include <vector> #include <map> #include <functional> #include <string> #include <algorithm> #i 阅读全文
posted @ 2022-12-03 23:16 repinkply 阅读(27) 评论(0) 推荐(0)
摘要: 一、类型萃取范例 1.通过萃取接口中的 value 值为true,false 我们就可以萃取出很多有用的信息。 #include <iostream> #include <future> #include <vector> #include <map> #include <functional> # 阅读全文
posted @ 2022-12-03 20:06 repinkply 阅读(131) 评论(0) 推荐(0)
摘要: 一、可变参数函数 1.这种能够接收非固定个数参数的函数就是可变参数函数 2.initializer_list 标准库类型,该类型能够使用的前提条件是:所有的实参类型相同。 二、initializer_list (初始化列表) 1.如果一个函数,它的实参 数量不可预知,但是所有的参数的类型相同,我们就 阅读全文
posted @ 2022-12-03 18:53 repinkply 阅读(161) 评论(0) 推荐(0)
摘要: 一、捕获列表中的 & & : 捕获外部作用域中的所有变量,并作为引用在lambda表达式中使用。按照引用这种捕获方式,会导致lambda表达式包含绑定到局部变量的引用。 #include <iostream> #include <future> #include <vector> #include 阅读全文
posted @ 2022-12-03 17:11 repinkply 阅读(193) 评论(0) 推荐(0)