C++23: An Overview of Almost All New and Updated Features
/ std::flat_(multi)set std::mdspan std::generator basic_string(_view)::contains() Construct string(_view) From nullptr basic_string::resize_and_overwrite() Monadic Operations for std::optional / std::flat_(multi)set std::mdspan std::generator basic_string(_view)::contains() Construct string(_view) From nullptr basic_string::resize_and_overwrite() Monadic Operations for std::optional / std::flat_(multi)set std::mdspan std::generator basic_string(_view)::contains() Construct string(_view) From nullptr basic_string::resize_and_overwrite() Monadic Operations for std::optional0 码力 | 105 页 | 759.96 KB | 5 月前3C++高性能并行编程与优化 - 课件 - 15 C++ 系列课:字符与字符串
类的构造函数? • 因为 cpp 之父喜欢解耦,他不想让数字转字符串这个特定的需求 ,和字符串本身的实现有太多耦合。 https://en.cppreference.com/w/cpp/string/basic_string/to_string to_string 应用案例 std::to_wstring 数字转宽字符串 • 同理还有 to_wstring ,用于把数字转换为 wstring 类型字符串。 是标准库定义的一系列全局函数: • 相当于 js 的 parseInt/parseFloat/parseDouble 。 https://en.cppreference.com/w/cpp/string/basic_string/stol stoi 应用案例 • stoi 可以处理数字后面有多余字符的情况,例如 stoi(“42yuan”) 和 stoi(“42”) 等价,都会返回 42 。后面的 “ 相对低效。 find 寻找子字符串 find 应用案例:计算子字符串出现了多少次 官方文档对 find 的描述 https://en.cppreference.com/w/cpp/string/basic_string/find 反向查找 rfind • find 是从字符串头部开始查找,返回第一次出现的地方。 • 而 rfind 则是从尾部开始查找,返回最后一次出现的地方 。 • 例如 “0 码力 | 162 页 | 40.20 MB | 1 年前3whats new in visual studio
Dos Reis – `Online _2 💡 Feature complete • C++23 • out_ptr and inout_ptr • contains for basic_string and basic_string_view • Other small features 🕙 Coming next for C++23 • STL • Standard library modules0 码力 | 42 页 | 19.02 MB | 5 月前3hazard pointer synchronous reclamation
1 Basic Hazard Pointer Algorithm read pointer A from SRC remove A from SRC 1 5 4 Safe to use pointer A SRC A hazard pointer is a single-writer multi-reader pointer. set HP to A if SRC == A clear asynchronous reclamation. Hazard Pointer Synchronous Reclamation Beyond Concurrency TS2 – Maged Michael Basic Cohort Implementation Hazard Pointer Synchronous Reclamation Beyond Concurrency TS2 – Maged Michael0 码力 | 31 页 | 856.38 KB | 5 月前3C++20: An (Almost) Complete Overview
std::popcount(0b01100101) };82 Small Standard Library Additions starts_with() and ends_with() for basic_string/basic_string_view: std::string str { "Hello world!" }; bool b { str.starts_with("Hello") }; 0 码力 | 85 页 | 512.18 KB | 5 月前3Working with Asynchrony Generically: A Tour of C++ Executors
CONTROL FLOW20 BASIC LIFETIME OF AN ASYNC OPERATION SCHEDULER schedule SENDER Implementation details of algorithms. Magic happens here. then(sender, fn) -> sender21 BASIC LIFETIME OF AN ASYNC0 码力 | 121 页 | 7.73 MB | 5 月前3Making Libraries Consumable for Non-C++ Developers
The size of wchar_t: • Windows, sizeof(wchar_t) == 2 • Non-Windows, sizeof(wchar_t) == 4 std::basic_stringhas memory implications. More on that later.What assumptions are being made? void 0 码力 | 29 页 | 1.21 MB | 5 月前3应用 waPC (rust) 做软件测试工具
MITM 例子 • 模拟数据规则 • 自动化测试 • 验证功能 Assertion • 稳定环境 Stable environment • 报告能力(例如 junit) Reporting Basic API testing requirement API 测试也用 rust 软件测试工具 • 模拟数据规则 • 自动化测试 • Multiple QA teams • Upgrading0 码力 | 30 页 | 2.50 MB | 1 年前3
共 8 条
- 1