 C++20's 12 C++20’s C++20's 12 C++20’s- Calendars and Time Zones in MSVC Miya Natsuhara ("MEE-yuh Not-soo-HAR-uh") Miya.Natsuhara@microsoft.com Software Engineer, Visual C++ LibrariesWelcome to CppCon 2021! Join Stephanson, and Daniel Marshall • A GitHub project tracking the issues, PRs, discussions, etc. related to C++20 chrono: Extensions to - (github.com) • Feature branch (feature/chrono) for rapid development satisfies the Clock requirements.20 C++20’s chrono adds several new clocks ([time.clock]) Existing clocks (pre-C++20) • system_clock • (file_clock) New clocks (in C++20) • utc_clock • tai_clock • gps_clock 0 码力 | 55 页 | 8.67 MB | 6 月前3
 C++20: An (Almost) Complete OverviewC++20: An (Almost) Complete Overview September 15th 2020 Marc Grégoire Software Architect marc.gregoire@nikon.com2 Marc Grégoire  Belgium  Software architect for Nikon Metrology  Microsoft Edition (C++20) coming later this year  Co-author of C++ Standard Library Quick Reference& C++17 Standard Library Quick Reference  Founder of the Belgian C++ Users Group (BeCPP)3 C++20 C++20 is big big! Lots of new features! On Friday September 4, 2020, the C++20 standard passed ISO voting, expected to be formally published by the end of 2020.4 Agenda  Modules  Ranges  Coroutines  Concepts0 码力 | 85 页 | 512.18 KB | 6 月前3 C++20: An (Almost) Complete OverviewC++20: An (Almost) Complete Overview September 15th 2020 Marc Grégoire Software Architect marc.gregoire@nikon.com2 Marc Grégoire  Belgium  Software architect for Nikon Metrology  Microsoft Edition (C++20) coming later this year  Co-author of C++ Standard Library Quick Reference& C++17 Standard Library Quick Reference  Founder of the Belgian C++ Users Group (BeCPP)3 C++20 C++20 is big big! Lots of new features! On Friday September 4, 2020, the C++20 standard passed ISO voting, expected to be formally published by the end of 2020.4 Agenda  Modules  Ranges  Coroutines  Concepts0 码力 | 85 页 | 512.18 KB | 6 月前3
 C++20 STL Features: 1 Year of Development on GitHubVersion 1.0 - September 15, 2020 1 C++20 STL Features: 1 Year of Development on GitHub Stephan T. Lavavej "Steh-fin Lah-wah-wade" Principal Software Engineer, Visual C++ Libraries stl@microsoft.com @StephanTLavavej2 • Write down the slide numbers • Part 0: Overview • What's happened in the last year • Part 1: C++20 STL Features • Everything here is Standard, except as noted • Part 2: GitHub Development • For CppCon 2019 • github.com/microsoft/STL • Apache License v2.0 with LLVM Exception • Implemented ~50 C++20 features • Majority from our amazing contributors • Extensively reviewed and tested • Released0 码力 | 45 页 | 702.09 KB | 6 月前3 C++20 STL Features: 1 Year of Development on GitHubVersion 1.0 - September 15, 2020 1 C++20 STL Features: 1 Year of Development on GitHub Stephan T. Lavavej "Steh-fin Lah-wah-wade" Principal Software Engineer, Visual C++ Libraries stl@microsoft.com @StephanTLavavej2 • Write down the slide numbers • Part 0: Overview • What's happened in the last year • Part 1: C++20 STL Features • Everything here is Standard, except as noted • Part 2: GitHub Development • For CppCon 2019 • github.com/microsoft/STL • Apache License v2.0 with LLVM Exception • Implemented ~50 C++20 features • Majority from our amazing contributors • Extensively reviewed and tested • Released0 码力 | 45 页 | 702.09 KB | 6 月前3
 whats new in visual studioCppCon 2021 CppCon 2021 What’s New In ‘ Visual Studio 64-bit IDE, C++20, WSL2, and More Marian Luparu (he/him) @mluparu Sy Brand (they/them) @TartanLlama C++ Product Team, Microsoft @VisualC https://aka Visual Studio 2019 version 16.11, C++20 is now feature complete • All features under /std:c++20 switch are production ready including modules, coroutines, concepts • C++20 features awaiting DR resolution for now under /std:c++latest Visit https://aka.ms/cpp/20 for more details Developer inner-loop C++20 in Visual Studio Build Debug Edit Code Navigation ☑️� Linters ☑️� Colorization & Formatting0 码力 | 42 页 | 19.02 MB | 6 月前3 whats new in visual studioCppCon 2021 CppCon 2021 What’s New In ‘ Visual Studio 64-bit IDE, C++20, WSL2, and More Marian Luparu (he/him) @mluparu Sy Brand (they/them) @TartanLlama C++ Product Team, Microsoft @VisualC https://aka Visual Studio 2019 version 16.11, C++20 is now feature complete • All features under /std:c++20 switch are production ready including modules, coroutines, concepts • C++20 features awaiting DR resolution for now under /std:c++latest Visit https://aka.ms/cpp/20 for more details Developer inner-loop C++20 in Visual Studio Build Debug Edit Code Navigation ☑️� Linters ☑️� Colorization & Formatting0 码力 | 42 页 | 19.02 MB | 6 月前3
 C++高性能并行编程与优化 -  课件 - 02 现代 C++ 入门:RAII 内存管理C++17 引入常用数值算法 未来: C++20 引入区间( ranges ) https://zhuanlan.zhihu.com/p/350068132 未来: C++20 引入模块( module ) https://zhuanlan.zhihu.com/p/350136757 未来: C++20 允许函数参数为自动推断( auto ) 未来: C++20 引入协程( coroutine coroutine )和生成器( generator ) 未来: C++20 标准库加入 format 支持 跑远了! • 鉴于 C++20 还没有普遍落地(例如 CMake 不支持 C++20 modules )因此我们的课程 基于 C++17 标准,有时会谈到 C++20 作为扩展阅读。 C++ 有哪些面向对象思想? C++ 思想:封装 比如要表达一个数组,需要:起始地址指针 v ,数组大小 nv 数,除了可以指定全部成员来构造以外, 还可以指定部分的成员,剩余没指定的保 持默认。 • 不过你得保证那个没指定的有在类成员定 义里写明 {} 初始化,否则有可能会变成内 存里的随机值。 • 顺便一提, C++20 中还可以通过指定名称来跳顺序: 编译器默认生成的构造函数:初始化列表(妙用,解决函数多返回值) • 典型的例子包括,图形学某知名应用中, 可以简化函数具有多个返回值的处理。 • 和 std::tuple0 码力 | 96 页 | 16.28 MB | 1 年前3 C++高性能并行编程与优化 -  课件 - 02 现代 C++ 入门:RAII 内存管理C++17 引入常用数值算法 未来: C++20 引入区间( ranges ) https://zhuanlan.zhihu.com/p/350068132 未来: C++20 引入模块( module ) https://zhuanlan.zhihu.com/p/350136757 未来: C++20 允许函数参数为自动推断( auto ) 未来: C++20 引入协程( coroutine coroutine )和生成器( generator ) 未来: C++20 标准库加入 format 支持 跑远了! • 鉴于 C++20 还没有普遍落地(例如 CMake 不支持 C++20 modules )因此我们的课程 基于 C++17 标准,有时会谈到 C++20 作为扩展阅读。 C++ 有哪些面向对象思想? C++ 思想:封装 比如要表达一个数组,需要:起始地址指针 v ,数组大小 nv 数,除了可以指定全部成员来构造以外, 还可以指定部分的成员,剩余没指定的保 持默认。 • 不过你得保证那个没指定的有在类成员定 义里写明 {} 初始化,否则有可能会变成内 存里的随机值。 • 顺便一提, C++20 中还可以通过指定名称来跳顺序: 编译器默认生成的构造函数:初始化列表(妙用,解决函数多返回值) • 典型的例子包括,图形学某知名应用中, 可以简化函数具有多个返回值的处理。 • 和 std::tuple0 码力 | 96 页 | 16.28 MB | 1 年前3
 C++高性能并行编程与优化 -  课件 - 15 C++ 系列课:字符与字符串业的字符串格式化工 具。 • 想要完整的功能(指定多少进制,左右对齐等),可以用专业的做法: 1. 古代 C 语言的 sprintf 2. 古代 C++ 的 stringstream 3. C++20 新增的 std::format 4. 第三方库提供的 fmt::format ( https://github.com/fmtlib/fmt ) 5. 参考小彭老师在 zeno 里手撸的两个函数(能支持任意 string 也有一个成员函数 compare ,他也是返回 -1 、 1 、 0 表示大小关系。此外, C++20 中引入了 <=> 这个万能比较运 算符,意在取代 compare 成为标准,不过这个更加强类型一点。 • 总之, a == b 和 !a.compare(b) 等价。 C++20 新增: starts_with 和 ends_with • s.starts_with(str) 等价于 cihou_array(FatPtr fptr); • 这就是 rust 炫耀已久的数组胖指针。 C++20 中的 span 也是这个思想。 • 他提倡把 ptr 和 len 这两个逻辑上相关的参数绑在一起,避免程序员犯错。 用胖指针表示字符串 • 其实胖指针的思想既不是 rust 原创的,也不是 C++20 以后才出现的。 • 为了表示动态长度的数组, C++ 中的 vector 和 string0 码力 | 162 页 | 40.20 MB | 1 年前3 C++高性能并行编程与优化 -  课件 - 15 C++ 系列课:字符与字符串业的字符串格式化工 具。 • 想要完整的功能(指定多少进制,左右对齐等),可以用专业的做法: 1. 古代 C 语言的 sprintf 2. 古代 C++ 的 stringstream 3. C++20 新增的 std::format 4. 第三方库提供的 fmt::format ( https://github.com/fmtlib/fmt ) 5. 参考小彭老师在 zeno 里手撸的两个函数(能支持任意 string 也有一个成员函数 compare ,他也是返回 -1 、 1 、 0 表示大小关系。此外, C++20 中引入了 <=> 这个万能比较运 算符,意在取代 compare 成为标准,不过这个更加强类型一点。 • 总之, a == b 和 !a.compare(b) 等价。 C++20 新增: starts_with 和 ends_with • s.starts_with(str) 等价于 cihou_array(FatPtr fptr); • 这就是 rust 炫耀已久的数组胖指针。 C++20 中的 span 也是这个思想。 • 他提倡把 ptr 和 len 这两个逻辑上相关的参数绑在一起,避免程序员犯错。 用胖指针表示字符串 • 其实胖指针的思想既不是 rust 原创的,也不是 C++20 以后才出现的。 • 为了表示动态长度的数组, C++ 中的 vector 和 string0 码力 | 162 页 | 40.20 MB | 1 年前3
 Working with Asynchrony Generically: A Tour of C++ Executorsgeneric async algorithms: • E.g., then, when_all, sync_wait, let_* • Utilities for integration with C++20 coroutines5 Example 1: Launching concurrent work6 EXAMPLE: LAUNCHING CONCURRENT WORK namespace for good performance.72 CANCELLATION IN SENDER/RECEIVER73 CANCELLATION SUPPORT IN C++20 Built on top of C++20’s std::stop_token support Calling code… … declares a std::stop_source and calls get_token()0 码力 | 121 页 | 7.73 MB | 6 月前3 Working with Asynchrony Generically: A Tour of C++ Executorsgeneric async algorithms: • E.g., then, when_all, sync_wait, let_* • Utilities for integration with C++20 coroutines5 Example 1: Launching concurrent work6 EXAMPLE: LAUNCHING CONCURRENT WORK namespace for good performance.72 CANCELLATION IN SENDER/RECEIVER73 CANCELLATION SUPPORT IN C++20 Built on top of C++20’s std::stop_token support Calling code… … declares a std::stop_source and calls get_token()0 码力 | 121 页 | 7.73 MB | 6 月前3
 Finding Bugs using Path-Sensitive Static AnalysisSutter Wednesday 27th • What's New in Visual Studio: 64-bit IDE, C++20, WSL 2, and more – Sy Brand & Marian Luparu Thursday 28th • C++20’s Finding Bugs using Path-Sensitive Static AnalysisSutter Wednesday 27th • What's New in Visual Studio: 64-bit IDE, C++20, WSL 2, and more – Sy Brand & Marian Luparu Thursday 28th • C++20’s- Calendars and Time Zones in MSVC – Miya Natsuhara 0 码力 | 35 页 | 14.13 MB | 6 月前3
 A Crash Course in Calendars, Dates, Time, and Time Zonesguarantees it never goes backwards  std::high_resolution_clock: has shortest possible tick period  C++20 adds:  utc_clock, tai_clock, gps_clock, and file_clock  Every clock has a now() method21 Clocks Compile-Time Rational Numbers  Durations  Clocks  Time Points  Dates  Time Zones29 Dates  Since C++20  Gregorian calendar support  Several classes to represent dates or part of dates:  year, month0 码力 | 43 页 | 551.60 KB | 6 月前3 A Crash Course in Calendars, Dates, Time, and Time Zonesguarantees it never goes backwards  std::high_resolution_clock: has shortest possible tick period  C++20 adds:  utc_clock, tai_clock, gps_clock, and file_clock  Every clock has a now() method21 Clocks Compile-Time Rational Numbers  Durations  Clocks  Time Points  Dates  Time Zones29 Dates  Since C++20  Gregorian calendar support  Several classes to represent dates or part of dates:  year, month0 码力 | 43 页 | 551.60 KB | 6 月前3
 C++高性能并行编程与优化 -  课件 - 01 学 C++ 从 CMake 学起矩阵库(附带一些常用函数,随机数生成等) 4. Tencent/rapidjson - 单纯的 JSON 库,甚至没依赖 STL (可定制性高,工程美学经典) 5. ericniebler/range-v3 - C++20 ranges 库就是受到他启发(完全是头文件组成) 6. fmtlib/fmt - 格式化库,提供 std::format 的替代品(需要 -DFMT_HEADER_ONLY ) 7. gabime/spdlog fmtlib/fmt - 格式化库,提供 std::format 的替代品 2. gabime/spdlog - 能适配控制台,安卓等多后端的日志库 3. ericniebler/range-v3 - C++20 ranges 库就是受到他启发 4. g-truc/glm - 模仿 GLSL 语法的数学矢量 / 矩阵库 5. abseil/abseil-cpp - 旨在补充标准库没有的常用功能 6.0 码力 | 32 页 | 11.40 MB | 1 年前3 C++高性能并行编程与优化 -  课件 - 01 学 C++ 从 CMake 学起矩阵库(附带一些常用函数,随机数生成等) 4. Tencent/rapidjson - 单纯的 JSON 库,甚至没依赖 STL (可定制性高,工程美学经典) 5. ericniebler/range-v3 - C++20 ranges 库就是受到他启发(完全是头文件组成) 6. fmtlib/fmt - 格式化库,提供 std::format 的替代品(需要 -DFMT_HEADER_ONLY ) 7. gabime/spdlog fmtlib/fmt - 格式化库,提供 std::format 的替代品 2. gabime/spdlog - 能适配控制台,安卓等多后端的日志库 3. ericniebler/range-v3 - C++20 ranges 库就是受到他启发 4. g-truc/glm - 模仿 GLSL 语法的数学矢量 / 矩阵库 5. abseil/abseil-cpp - 旨在补充标准库没有的常用功能 6.0 码力 | 32 页 | 11.40 MB | 1 年前3
共 16 条
- 1
- 2













