您的位置:首页 > 编程语言 > C语言/C++

C++ 17 的最新动态

2016-03-05 12:18 471 查看

cpp17#本次会议确定的 C++ 17 特性:

Core Lang:

[[fallthrough]]
[[nodiscard]]
[[maybe_unused]]
P0068R0

constexpr
Lambdas(允许一个
closure type
作为
literal type
,对
lambda
的调用可以一个
constant expression
(closure type 的
operator()
是否是
constexpr
可推导)N4487

Unary Folds and Empty Parameter Packs P0036R0

Generalizing range-based for loops 允许
range-based for loop
里面的
begin()
end()
返回两个不同的类型 P0184R0

Capturing *this in lambdas 可以对
*this
进行捕捉,一旦捕捉了
*this
就不可以隐式用
this
P0018R2

Hexadecimal floating literals P0245r0

Construction Rules for enum class Values 允许用
{v}
直接构造
enum class
v
enum class
underlying type
不允许 narrow conversion)。P0138R0

Module 与 Coroutine(
co_await
, …)进入 TS。

Concepts 被否。

operator dot、
constexpr_if
if constexpr
?)、order of evalution、
std::byte
等推迟到下次会议(Oulu)。

Library:

几乎整个 Library Fundamentals v1,包括
type_traits_v
string_view
optional
any
(type-erased allocator 有待确认)N4480

File System P02180R0

Parallelism (各种并行算法)P0024R1

Special Math Functions 相当多的花样数学函数!P0226R0
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: