目录
2.2New Keywords&New identifiers(新关键字与新标识符)
3.4.5concepts的使用使得编译器能帮助我们检查并给出清晰的错误信息
4.1.1[=,this] as Lambda Capture
4.1.2templated lambda expression
4.1.3Pack Expansion in Lambda Captures
4.2.1constexpr virtual functions
4.2.2union,try/catch,dynamic_cast,typeid
4.3.2Joining & Cancellable Threads
4.3.3The C++20 Synchronization Library
5.3Range-based For Loop Initializer
5.4Non-Type Template Parameters
5.9<version>
5.10Immediate Functions-consteval
5.12Class Enums and using Directive
0.引入
0.1链接与背景介绍
本次演讲人是此书的作者Marc Gregoire
0.1本文中的一些词语

1.演讲人背景

2.Agenda(议程)
2.1OverRall(总体概况)

2.2New Keywords&New identifiers(新关键字与新标识符)

3.四大概念主题讲解
3.1Module(模块)
3.1.1总体介绍

3.1.2模块的使用的简单例子

3.1.3标准库头文件与客户自定义头文件的导入方法

3.2Ranges
3.2.1什么是Ranges&为什么我们要选择Ranges

3.2.2一些相关概念

3.2.3用法

3.3Coroutines
3.3.1什么是Coroutines(什么是协程)

3.3.2Coroutines可以用来做什么呢?

3.3.3目前对协程的支持情况

3.3.4VC下面的一个简单示例

3.4Concepts
3.4.1Concepts的作用

3.4.2简单使用

3.4.3更强大的使用

3.4.4相关概念

3.4.5concepts的使用使得编译器能帮助我们检查并给出清晰的错误信息

4.重要变化
4.1Lambda Expression Changes
4.1.1[=,this] as Lambda Capture

4.1.2templated lambda expression



4.1.3Pack Expansion in Lambda Captures

4.2constexpr changes
4.2.1constexpr virtual functions
4.2.2union,try/catch,dynamic_cast,typeid
4.2.3allocations

4.2.4constexpr string&vector

4.3concurrency changes
4.3.1Atomic Smart Pointers


4.3.2Joining & Cancellable Threads




4.3.3The C++20 Synchronization Library





5.其他小变化
5.1Designated Initializers

5.2 Spaceship Operator<=>
5.2.1简单的应用


5.2.2C++17到C++20的变迁
\
5.2.3<=>在标准库中的应用

5.3Range-based For Loop Initializer
5.3.1C++17中的基于范围的for循环初始化

5.3.2C++20中的基于范围的for循环初始化

5.4Non-Type Template Parameters

5.5[[likely]][[unlikely]]

5.6Calendars&TimeZones







5.7std::span



5.8Feature Test Macros


5.9<version>

5.10Immediate Functions-consteval


5.11constinit

5.12Class Enums and using Directive

5.13Text Formatting


5.14 Math Constants

5.15std::source_location

5.16[[nodiscard(reason)]]

5.17Bit Operations

5.18Small STL Additionas


6.总结
好好学吧~~
本文详细介绍了C++20中的重要更新,包括模块(Module)的引入,简化了头文件的管理和依赖性;Ranges的概念,提升迭代操作的效率和可读性;协程(Coroutines)的使用,支持异步编程;以及Concepts的引入,增强了模板的类型检查。此外,还涵盖了constexpr、并发、Lambda表达式、新关键字等方面的变更和新特性。
670

被折叠的 条评论
为什么被折叠?



