加入收藏 | 设为首页 | 会员中心 | 我要投稿 核心网 (https://www.hxwgxz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 建站 > 正文

C++20最新进展:已完成设计 加入模块和协程

发布时间:2019-02-26 14:02:24 所属栏目:建站 来源:局长
导读:C++ 委员会于上周在夏威夷科纳举办了一场官方 ISO 会议,以确定下一个国际标准 C++20 的功能集。根据会议报告,C++20 的功能设计现已完成。计划于 2019 年 7 月在科隆举行的会议上,完成C++20 的规范并发送一份委员会草案以供审查。 上周会议确定添加至 C+

 C++ 委员会于上周在夏威夷科纳举办了一场官方 ISO 会议,以确定下一个国际标准 C++20 的功能集。根据会议报告,C++20 的功能设计现已完成。计划于 2019 年 7 月在科隆举行的会议上,完成 C++20 的规范并发送一份委员会草案以供审查。

C++20最新进展:已完成设计 加入模块和协程

上周会议确定添加至 C++20 草案的新特性:

  • Modules!

  • Coroutines!

  • staticthread_local, and lambda capture for structured bindings.

  • std::polymorphic_allocator<>.

  • std::midpoint and std::lerp.

  • std::execution::unseq execution policy.

  • std::ssize () free function that returns a sized size.

  • std::span usability enhancements.

  • Precalculated hash values in lookup.

而以下的特性已在本次会议或之前的会议上获得了 C++20 批准,但尚未添加到 C++20 中,因为目前仍在完成规范。它们有望在 2019 年 7 月的科隆会议上被加入,不过由于时间限制,可能无法完成所有工作。

  • Expansion statements.

  • The C++20 synchronization library.

  • std::format.

  • constexpr std::vector.

  • Allow constexpr allocation, but disallow allocations that are not deleted at compile time.

  • constexpr std::type_info::operator==.

  • New conceptification of iterators.

  • Monadic operations for std::optional.

  • std::source_location.

  • std::flatmap.

  • std::flatset.

  • std::ostream_joiner.

  • Stack trace library.

  • std::byteswap.

  • constinit.

  • Deprecating some uses of volatile.

  • Implicit creation of objects for low-level object manipulation.

  • using enum.

而下面的这些特性,早已在之前的会议上获得了 C++ 20 批准。

  • Concepts.

  • Contracts.

  • Ranges.

  • operator<=>.

  • A lot more constexpr features: consteval functions, std::is_constant_evaluatedconstexpr unionconstexpr try and catchconstexpr dynamic_cast and typeid.

  • Feature test macros.

  • std::span.

  • Synchronized output.

  • std::atomic_ref.

总之,C++20 应该会是一个像 C++11 那样的大版本。

据透露,工具研究小组 SG15 决定创建一个 C++ 生态系统技术报告,该报告将描述新模块化 C++ 世界中工具(构建系统等)的最佳实践和最新技术。

【编辑推荐】

  1. 10个Java开发人员的顶级测试工具、库和框架介绍
  2. 微软中国 CTO:请把 AI 拉下神坛
  3. 被误解的中国通信业,你是其中一分子吗
  4. 互联网寒冬来临时的三件事:找路、找钱、找春天
  5. 特朗普发推暗示对华为让步!美国希望通过竞争而不是封杀赢得胜利
【责任编辑:张燕妮 TEL:(010)68476606】
点赞 0

(编辑:核心网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读