C++20 STL Features: 1 Year of Development on GitHub
0 码力 | 45 页 | 702.09 KB | 5 月前文档介绍了微软在GitHub上开发C++20 STL功能的历程,包括功能实现、代码评审和测试流程。GitHub上的项目采用线性提交历史,极少使用功能分支,并通过持续集成和代码格式验证确保代码质量。此外,文档还提到了C++20功能的目标,共有23项功能尚未完成。C++20: An (Almost) Complete Overview
0 码力 | 85 页 | 512.18 KB | 5 月前The document provides a comprehensive overview of the C++20 standard, highlighting key features such as Modules, Ranges, Coroutines, and Concepts. It also covers significant improvements including enhancements to lambda expressions, constexpr functionality, and concurrency support through atomic smart pointers and synchronization primitives. Additionally, text formatting with std::format and other library additions are introduced. These features aim to improve code efficiency, readability, and functionality.C++23: An Overview of Almost All New and Updated Features
0 码力 | 105 页 | 759.96 KB | 5 月前文档详细介绍了C++23的新特性,包括核心语言和标准库的更新。核心语言部分新增了显式对象参数、if consteval、多维订阅运算符等功能。标准库部分引入了std::flat_map、std::generator、std::mdspan等新容器,增强了字符串操作和范围库的功能。此外,文档还提到了C++23移除了垃圾回收支持等旧特性。Lock-Free Atomic Shared Pointers Without a Split Reference Count? It Can Be Done!
0 码力 | 45 页 | 5.12 MB | 5 月前The document discusses the implementation of lock-free atomic shared pointers without a split reference count, exploring how existing atomic/shared_ptr is implemented using the split reference count technique. It covers concurrency patterns, deferred reclamation (garbage collection in C++), and benchmarks for lock-free code, considering factors like throughput, latency, workload, data locality, and contention. A lock-free stack implementation is demonstrated using atomic/shared_ptr, and the challenges of concurrent operations on shared pointers are addressed through a split reference count approach.Finding Bugs using Path-Sensitive Static Analysis
0 码力 | 35 页 | 14.13 MB | 5 月前文档介绍了在C++中使用路径敏感的静态分析技术来检测和修复代码中的错误,特别是null指针引用等问题。文中提到Microsoft Visual Studio C++团队在2012年开始引入路径敏感分析,并逐年优化,目前已支持void安全和其他高级功能。通过Fourier-Motzkin消除等数学方法,MSVC能够更精确地分析代码路径,从而有效减少虚假警报和提高检测准确率。文档还回顾了该技术的演进历程,并展望了未来的改进方向。A Crash Course in Calendars, Dates, Time, and Time Zones
0 码力 | 43 页 | 551.60 KB | 5 月前文档介绍了C++中处理日期、时间和时区的主要机制。文档涵盖了从编译时有理数到具体时间处理的各个方面,包括持续时长(Durations)、时钟(Clocks)、时间点(Time Points)、日期(Dates)以及时区(Time Zones)的处理。具体内容包括:使用<chrono>库处理时间间隔,使用<ratio>处理编译时有理数,以及自C++20起提供的Gregorian日历支持。文档还展示了如何在不同时区之间进行时间转换,并通过代码示例说明了如何操作这些时间相关的类。C++20's <Chrono>
0 码力 | 55 页 | 8.67 MB | 5 月前文档介绍了C++20 <chrono> 库的新特性和改进,重点包括新增的钟(clock)类型,如utc_clock、tai_clock和gps_clock,以及新的trait is_clock用于检测类型是否满足时钟要求。此外,文档还讨论了时间区(time_zone)的实现挑战,特别是针对Windows的调整和实现细节。C++20的chrono库在MSVC中的开发过程包括代码-review视频和社区协作,旨在更好地支持时间相关的操作和时区转换。FlexClass
0 码力 | 8 页 | 957.56 KB | 5 月前文档介绍了FlexClass,一个用于C++动态大小类的工具,支持多个数组、正确对齐和异常安全,并提供了自定义句柄和内存分配器。文档中展示了如何使用FlexClass创建动态数组类,并与C++标准库的shared_ptr进行对比。FlexClass旨在简化动态大小对象的内存管理,同时提供更高的灵活性和安全性。Making Libraries Consumable for Non-C++ Developers
0 码力 | 29 页 | 1.21 MB | 5 月前文档讨论了如何让非C++开发者更好地使用C++库,重点介绍了调用约定、内存管理和数据类型等方面的注意事项。文档强调了明确调用约定、避免跨边界异常处理以及精确定义数据类型的重要性,并提到了不同平台和编译器在内存管理和数据类型上的差异。还提出了一些最佳实践,包括接受内存分配回调、限制隐式内存模型以及明确记录所有假设和详细信息。Working with Asynchrony Generically: A Tour of C++ Executors
0 码力 | 121 页 | 7.73 MB | 5 月前文档介绍了C++ Executors提案,目标是提供一个类似STL的异步编程工具库。提案提出了一组核心概念,包括sender、scheduler、receiver等,用于表示计算资源、异步工作单元和完成处理程序,并提供了如then、when_all、sync_wait等通用的异步算法。这些算法支持与C++20协程的集成,并计划扩展更多功能,如带有时间的算法、系统调度器、手动事件循环调度器等。文档还讨论了结构化并发、取消机制的实施,以及如何将async ranges与C++17并行算法结合。
共 33 条
- 1
- 2
- 3
- 4
关键词
C++20 STL Features GitHub Development C++20 features STL Apache License v2.0 Modules Ranges Coroutines Concepts Text Formatting C++23 Core Language C++23 Standard Library std::flat_(multi)map/set std::generator std::mdspan lock-free atomic_shared_ptr split reference count shared_ptr compare_exchange path-sensitive static analysis Fourier-Motzkin elimination void safety flow-sensitive analysis Null pointer dereference Durations Clocks Time Points Dates Time Zones C++20 chrono clock time_zone time_point fc::AdjacentArray my::make_shared std::shared_ptr fc::make fc::make_tuple 调用约定 内存管理 数据类型 异常处理 跨平台兼容性 std::execution sender scheduler receiver async algorithms