摘要: 一、std::string_view 它本质上只是一个指向现有内存的指针,换句话说,就是一个const char* , 指向其他人拥有的现有字符串,再加上一个大小size 冷知识:const char定义字符串变量比std::string定义字符串变量省内存。 const char本质就是指针变量, 阅读全文
posted @ 2025-12-31 18:07 超轶绝尘 阅读(3) 评论(0) 推荐(0)
摘要: 一、实例代码 问题 无论std::async调用了多少次,只额外单启动了一个线程,并且串行执行!待解惑 #include<iostream> #include<thread> #include <chrono> #include <future> //锁 static std::mutex s_mu 阅读全文
posted @ 2025-12-31 15:54 超轶绝尘 阅读(9) 评论(0) 推荐(0)