Visual C++ 语言一致性Visual C++ Language Conformance

本主题概述了 Visual Studio 2017 及早期版本中,针对 Visual C++ 的编译器功能和标准库功能的 ISO C++03、C++11、C++14、C++17 以及 C++20 草稿语言标准一致性。This topic summarizes the ISO C++03, C++11, C++14, C++17, and Draft C++20 language standards conformance of compiler features and Standard Library features for Visual C++ in Visual Studio 2017 and earlier versions. 每个编译器和标准库功能名称都可链接到介绍该功能的 ISO C++ 标准建议文章(如果在发布时可用)。Each compiler and standard library feature name links to the ISO C++ Standard proposal paper that describes the feature, if one is available at publication time. “支持”列中列出了首次出现在其中并支持该功能的 Visual Studio 版本。The Supported column lists the Visual Studio version in which support for the feature first appeared.

若要深入了解 Visual Studio 2017 中的一致性改进和其他更改,请参阅 Visual Studio 2017 中 C++ 的一致性改进Visual Studio 2017 中 Visual C++ 的新增功能For details on conformance improvements and other changes in Visual Studio 2017, see C++ conformance improvements in Visual Studio 2017 and What's New for Visual C++ in Visual Studio 2017. 若要了解早期版本中的一致性更改,请参阅 Visual C++ 更改历史记录2003 至 2015 各版本中 Visual C++ 的新增功能For conformance changes in earlier versions, see Visual C++ change history and Visual C++ What's New 2003 through 2015. 有关来自 C++ 团队的最新信息,请访问 Visual C++ 团队博客For current news from the C++ team, visit the Visual C++ team blog.

备注

Visual Studio 2015 和 Visual Studio 2017 之间没有二进制的重大更改。There are no binary breaking changes between Visual Studio 2015 and Visual Studio 2017.

编译器功能Compiler Features

功能区域Feature Area
C++03/11 核心语言功能C++03/11 Core Language Features 支持Supported
  其他所有内容  Everything else VS 2015 AVS 2015 A
  两阶段名称查找  Two-phase name lookup 部分 BPartial B
  N2634 表达式 SFINAE  N2634 Expression SFINAE 部分 CPartial C
  N1653 C99 预处理器  N1653 C99 preprocessor 部分 DPartial D
  N1988 扩展的整型  N1988 Extended integer types N/A EN/A E
C++ 14 核心语言功能C++14 Core Language Features 支持Supported
  N3323 上下文转换的已调整 wording  N3323 Tweaked wording for contextual conversions VS 2013VS 2013
  N3472 二进制文本  N3472 Binary literals VS 2015VS 2015
  N3638 auto 和 decltype(auto) 返回类型  N3638 auto and decltype(auto) return types VS 2015VS 2015
  N3648 init-captures  N3648 init-captures VS 2015VS 2015
  N3649 泛型 lambda  N3649 Generic lambdas VS 2015VS 2015
  N3760 [[已弃用]] 属性  N3760 [[deprecated]] attribute VS 2015VS 2015
  N3778 调整大小的释放  N3778 Sized deallocation VS 2015VS 2015
  N3781 数字分隔符  N3781 Digit separators VS 2015VS 2015
  N3651 变量模板  N3651 Variable templates VS 2015.2VS 2015.2
  N3652 扩展的 constexpr  N3652 Extended constexpr VS 2017VS 2017
  N3653 聚合的 NSDMI  N3653 NSDMIs for aggregates VS 2017VS 2017
  N3664 避免/合成分配  N3664 Avoiding/fusing allocations N/A FN/A F
C++ 17 核心语言功能C++17 Core Language Features 支持Supported
  N4086 删除三字符组  N4086 Removing trigraphs VS 2010 14VS 2010 14
  N3922 针对自动使用大括号内的初始值设定项列表的新建规则  N3922 New rules for auto with braced-init-lists VS 2015 14VS 2015 14
  N4051 模板-参数模板的类型名称  N4051 typename in template template-parameters VS 2015 14VS 2015 14
  N4266 命名空间和枚举器的属性  N4266 Attributes for namespaces and enumerators VS 2015 14VS 2015 14
  N4267 u8 字符文本  N4267 u8 character literals VS 2015 14VS 2015 14
  N4230 嵌套的命名空间定义  N4230 Nested namespace definitions VS 2015.3 17VS 2015.3 17
  N3928 简要静态断言  N3928 Terse static_assert VS 2017 17VS 2017 17
  P0184R0 一般化的基于范围的 for 循环  P0184R0 Generalized range-based for-loops VS 2017 14VS 2017 14
  P0188R1 [[fallthrough]] 属性  P0188R1 [[fallthrough]] attribute VS 2017 17VS 2017 17
  P0001R1 删除 register 关键字  P0001R1 Removing the register keyword VS 2017 15.3 17VS 2017 15.3 17
  P0002R1 删除 bool 的 operator++  P0002R1 Removing operator++ for bool VS 2017 15.3 17VS 2017 15.3 17
  P0018R3 按值捕获 *this  P0018R3 Capturing *this by value VS 2017 15.3 17VS 2017 15.3 17
  P0028R4 不重复使用属性命名空间  P0028R4 Using attribute namespaces without repetition VS 2017 15.3 17VS 2017 15.3 17
  P0061R1 __has_include  P0061R1 __has_include VS 2017 15.3 14VS 2017 15.3 14
  P0138R2 直接列表初始化整数中的固定枚举  P0138R2 Direct-list-init of fixed enums from integers VS 2017 15.3 17VS 2017 15.3 17
  P0170R1 constexpr lambda  P0170R1 constexpr lambdas VS 2017 15.3 17VS 2017 15.3 17
  P0189R1 [[nodiscard]] 属性  P0189R1 [[nodiscard]] attribute VS 2017 15.3 17VS 2017 15.3 17
  P0212R1 [[maybe_unused]] 属性  P0212R1 [[maybe_unused]] attribute VS 2017 15.3 17VS 2017 15.3 17
  P0217R3 结构化绑定  P0217R3 Structured bindings VS 2017 15.3 17VS 2017 15.3 17
  P0292R2 constexpr if 语句  P0292R2 constexpr if-statements VS 2017 15.3 GVS 2017 15.3 G
  P0305R1 具有初始化表达式的选择语句  P0305R1 Selection statements with initializers VS 2017 15.3 17VS 2017 15.3 17
  P0245R1 Hexfloat 文本  P0245R1 Hexfloat literals VS 2017 15.5 17VS 2017 15.5 17
  N4268 允许更多非类型模板参数  N4268 Allowing more non-type template args VS 2017 15.5 17VS 2017 15.5 17
  N4295 折叠表达式  N4295 Fold expressions VS 2017 15.5 17VS 2017 15.5 17
  P0003R5 删除动态-异常-规范  P0003R5 Removing dynamic-exception-specifications VS 2017 15.5 17VS 2017 15.5 17
  P0012R1 向类型系统添加 noexcept  P0012R1 Adding noexcept to the type system VS 2017 15.5 17VS 2017 15.5 17
  P0035R4 过度对齐的动态内存分配  P0035R4 Over-aligned dynamic memory allocation VS 2017 15.5 17VS 2017 15.5 17
  P0386R2 内联变量  P0386R2 Inline variables VS 2017 15.5 17VS 2017 15.5 17
  P0522R0 将template-parameters 模板与兼容参数匹配  P0522R0 Matching template template-parameters to compatible arguments VS 2017 15.5 17VS 2017 15.5 17
  P0036R0 删除某些空的一元折叠  P0036R0 Removing some empty unary folds VS 2017 15.5 17VS 2017 15.5 17
  N4261 修复限定转换  N4261 Fixing qualification conversions NoNo
  P0017R1 扩展的聚合初始化  P0017R1 Extended aggregate initialization NoNo
  P0091R3 类模板的模板参数推导  P0091R3 Template argument deduction for class templates
  P0512R0 类模板参数推导问题  P0512R0 Class template argument deduction issues
NoNo
  P0127R2 使用 auto 声明非类型模板参数  P0127R2 Declaring non-type template parameters with auto NoNo
  P0135R1 保证副本省略  P0135R1 Guaranteed copy elision HNo H
  P0136R1 重新组织继承构造函数  P0136R1 Rewording inheriting constructors NoNo
  P0145R3 改进表达式计算顺序  P0145R3 Refining expression evaluation order
  P0400R0 函数参数的计算顺序  P0400R0 Order of evaluation of function arguments
NoNo
  P0195R2 using 声明中的包扩展  P0195R2 Pack expansions in using-declarations NoNo
  P0283R2 忽略无法识别的属性  P0283R2 Ignoring unrecognized attributes NoNo
  P0702R1 修复 initializer-list ctor 的类模板参数推导  P0702R1 Fixing class template argument deduction for initializer-list ctors NoNo
C++20 核心语言功能C++20 Core Language Features 支持Supported
  P0306R4 添加 __VA_OPT_&#95 用于省略和删除逗号  P0306R4 Adding __VA_OPT__ for comma omission and comma deletion NoNo
  P0329R4 指定的初始化  P0329R4 Designated initialization NoNo
  P0409R2 允许 lambda 捕获 [=, this]  P0409R2 Allowing lambda-capture [=, this] NoNo
  P0428R2 泛型 lambda 的熟悉模板语法  P0428R2 Familiar template syntax for generic lambdas NoNo
  P0683R1 位域的默认成员初始化表达式  P0683R1 Default member initializers for bit-fields NoNo
  P0704R1 修复指向成员的 const 左值引用限定的指针  P0704R1 Fixing const lvalue ref-qualified pointers to members NoNo
  P0734R0 概念  P0734R0 Concepts NoNo

标准库功能Standard Library Features

功能区域Feature Area
C++20 标准库功能C++20 Standard Library Features 支持Supported
  P0463R1 endian  P0463R1 endian NoNo
  P0674R1 数组的 make_shared()  P0674R1 make_shared() For Arrays NoNo
C++17 标准库功能C++17 Standard Library Features 支持Supported
  P0433R2 将类模板的模板推导集成到标准库中  P0433R2 Integrating template deduction for class templates into the standard library
  P0739R0 改进集成到标准库中的类模板参数推导  P0739R0 Improving class template argument deduction integration into the standard library
NoNo
  P0426R1 char_traits 的 constexpr  P0426R1 constexpr For char_traits NoNo
  P0030R1 hypot(x, y, z)  P0030R1 hypot(x, y, z) NoNo
  P0220R1 Library Fundamentals V1  P0220R1 Library Fundamentals V1 部分 JPartial J
  P0067R5 基本字符串转换  P0067R5 Elementary String Conversions NoNo
  N4562 库基础知识:<memory_resource>  N4562 Library Fundamentals: <memory_resource>
  P0337R0 删除 polymorphic_allocator 分配  P0337R0 Deleting polymorphic_allocator Assignment
NoNo
  P0024R2 并行算法  P0024R2 Parallel Algorithms
  P0336R1 重命名并行执行策略  P0336R1 Renaming Parallel Execution Policies
  P0394R4 并行算法应该对异常调用 terminate()  P0394R4 Parallel Algorithms Should terminate() For Exceptions
  P0452R1 统一 <numeric> 并行算法  P0452R1 Unifying <numeric> Parallel Algorithms
NoNo
  P0226R1 特殊数学函数  P0226R1 Mathematical Special Functions NoNo
  P0218R1 <filesystem>  P0218R1 <filesystem>
  P0219R1 文件系统的相对路径  P0219R1 Relative Paths For Filesystem
  P0317R1 文件系统的目录项缓存  P0317R1 Directory Entry Caching For Filesystem
  P0392R0 文件系统路径中支持 string_view  P0392R0 Supporting string_view In Filesystem Paths
  P0430R2 支持非 POSIX 文件系统  P0430R2 Supporting Non-POSIX Filesystems
  P0492R2 解析文件系统的 NB 注释  P0492R2 Resolving NB Comments for Filesystem
KNo K
  P0003R5 删除动态异常规范  P0003R5 Removing Dynamic Exception Specifications VS 2017 15.5 17VS 2017 15.5 17
  P0005R4 not_fn()  P0005R4 not_fn()
  P0358R1 not_fn() 的修补程序  P0358R1 Fixes For not_fn()
VS 2017 15.5 17VS 2017 15.5 17
  P0033R1 重新组织 enable_shared_from_this  P0033R1 Rewording enable_shared_from_this VS 2017 15.5 17VS 2017 15.5 17
  P0083R3 拼接映射和集  P0083R3 Splicing Maps And Sets
  P0508R0 阐明 insert_return_type  P0508R0 Clarifying insert_return_type
VS 2017 15.5 17VS 2017 15.5 17
  P0174R2 弃用残留库部分  P0174R2 Deprecating Vestigial Library Parts VS 2017 15.5 17VS 2017 15.5 17
  P0302R1 删除 std::function 中的分配器支持  P0302R1 Removing Allocator Support In std::function VS 2017 15.5 17VS 2017 15.5 17
  P0414R2 shared_ptr<T[]>、shared_ptr<T[N]>  P0414R2 shared_ptr<T[]>, shared_ptr<T[N]>
  P0497R0 修复数组的 shared_ptr  P0497R0 Fixing shared_ptr For Arrays
VS 2017 15.5 17VS 2017 15.5 17
  P0521R0 弃用 shared_ptr::unique()  P0521R0 Deprecating shared_ptr::unique() VS 2017 15.5 17VS 2017 15.5 17
  P0607R0 标准库的内联变量  P0607R0 Inline Variables for the Standard Library VS 2017 15.5 17VS 2017 15.5 17
  P0618R0 弃用 <codecvt>  P0618R0 Deprecating <codecvt> VS 2017 15.5 17VS 2017 15.5 17
  N4562 库基础知识:Boyer Moore search()  N4562 Library Fundamentals: Boyer-Moore search()
  P0253R1 修复搜索器返回类型  P0253R1 Fixing Searcher Return Types
VS 2017 15.3 17VS 2017 15.3 17
  P0031R0 <数组> (Again) 和 <迭代器>的 constexpr  P0031R0 constexpr For <array> (Again) And <iterator> VS 2017 15.3 17VS 2017 15.3 17
  P0040R3 扩展内存管理工具  P0040R3 Extending Memory Management Tools VS 2017 15.3 17VS 2017 15.3 17
  P0084R2 Emplace 返回类型  P0084R2 Emplace Return Type VS 2017 15.3 17VS 2017 15.3 17
  P0152R1 atomic::is_always_lock_free  P0152R1 atomic::is_always_lock_free VS 2017 15.3 17VS 2017 15.3 17
  P0154R1 hardware_destructive_interference_size 等  P0154R1 hardware_destructive_interference_size, etc. VS 2017 15.3 17VS 2017 15.3 17
  P0156R2 将可变参数 lock_guard 重命名为 scoped_lock  P0156R2 Renaming Variadic lock_guard to scoped_lock VS 2017 15.3 17VS 2017 15.3 17
  P0258R2 has_unique_object_representations  P0258R2 has_unique_object_representations VS 2017 15.3 LVS 2017 15.3 L
  P0295R0 gcd()、lcm()  P0295R0 gcd(), lcm() VS 2017 15.3 17VS 2017 15.3 17
  P0298R3 std::byte  P0298R3 std::byte VS 2017 15.3 17byteVS 2017 15.3 17, byte
  P0403R1 <string_view>(“meow”sv 等)的 UDL  P0403R1 UDLs For <string_view> ("meow"sv, etc.) VS 2017 15.3 17VS 2017 15.3 17
  P0418R2 原子 compare_exchange memory_order 要求  P0418R2 atomic compare_exchange memory_order Requirements VS 2017 15.3 14VS 2017 15.3 14
  P0435R1 修改 common_type  P0435R1 Overhauling common_type
  P0548R1 调整 common_type 和持续时间  P0548R1 Tweaking common_type and duration
VS 2017 15.3 14VS 2017 15.3 14
  P0505R0 <chrono> (Again) 的 constexpr  P0505R0 constexpr For <chrono> (Again) VS 2017 15.3 17VS 2017 15.3 17
  P0513R0 中毒哈希  P0513R0 Poisoning hash
  P0599R1 noexcept 哈希  P0599R1 noexcept hash
VS 2017 15.3 14VS 2017 15.3 14
  P0516R0 将 shared_future 复制标记为 noexcept  P0516R0 Marking shared_future Copying As noexcept VS 2017 15.3 14VS 2017 15.3 14
  P0517R0 从 future_errc 构造 future_error  P0517R0 Constructing future_error From future_errc VS 2017 15.3 14VS 2017 15.3 14
  P0558R1 解决 atomic 已命名基类不一致的问题  P0558R1 Resolving atomic Named Base Class Inconsistencies VS 2017 15.3 14VS 2017 15.3 14
  P0604R0 将 is_callable/result_of 更改为 invoke_result、is_invocable、is_nothrow_invocable  P0604R0 Changing is_callable/result_of To invoke_result, is_invocable, is_nothrow_invocable VS 2017 15.3 17VS 2017 15.3 17
  N4562 库基础知识:<algorithm> sample()  N4562 Library Fundamentals: <algorithm> sample() VS 2017VS 2017
  N4562 库基础知识:<any>  N4562 Library Fundamentals: <any> VS 2017VS 2017
  N4562 库基础知识:<optional>  N4562 Library Fundamentals: <optional> VS 2017VS 2017
  N4562 库基础知识:<string_view>  N4562 Library Fundamentals: <string_view> VS 2017VS 2017
  N4562 库基础知识:<tuple> apply()  N4562 Library Fundamentals: <tuple> apply() VS 2017VS 2017
  P0032R3 variant/any/optional 的同类接口  P0032R3 Homogeneous Interface For variant/any/optional VS 2017VS 2017
  P0077R2 is_callable、is_nothrow_callable  P0077R2 is_callable, is_nothrow_callable VS 2017VS 2017
  P0088R3 <variant>  P0088R3 <variant> VS 2017VS 2017
  P0163R0 shared_ptr::weak_type  P0163R0 shared_ptr::weak_type VS 2017VS 2017
  P0209R2 make_from_tuple()  P0209R2 make_from_tuple() VS 2017VS 2017
  P0254R2 将 string_view 和 std::string 集成  P0254R2 Integrating string_view And std::string VS 2017VS 2017
  P0307R2 使 Optional 再次大于等于  P0307R2 Making Optional Greater Equal Again VS 2017VS 2017
  P0393R3 使 Variant 大于等于  P0393R3 Making Variant Greater Equal VS 2017VS 2017
  P0504R0 再次访问 in_place_t/in_place_type_t<T>/in_place_index_t<I>  P0504R0 Revisiting in_place_t/in_place_type_t<T>/in_place_index_t<I> VS 2017VS 2017
  P0510R0 拒绝 Nothing、数组、引用和不完整类型的 variant  P0510R0 Rejecting variants Of Nothing, Arrays, References, And Incomplete Types VS 2017VS 2017
  P0025R1 clamp()  P0025R1 clamp() VS 2015.3VS 2015.3
  P0185R1 is_swappable、is_nothrow_swappable  P0185R1 is_swappable, is_nothrow_swappable VS 2015.3VS 2015.3
  P0272R1 非常量 basic_string::data()  P0272R1 Non-const basic_string::data() VS 2015.3VS 2015.3
  N4387 改进 pair 和 tuple  N4387 Improving pair And tuple VS 2015.2 14VS 2015.2 14
  N4508 shared_mutex (Untimed)  N4508 shared_mutex (Untimed) VS 2015.2 14VS 2015.2 14
  P0004R1 删除已弃用的 Iostreams 别名  P0004R1 Removing Deprecated Iostreams Aliases VS 2015.2 remVS 2015.2 rem
  P0006R0 类型特征(is_same_v 等)的变量模板  P0006R0 Variable Templates For Type Traits (is_same_v, etc.) VS 2015.2 14VS 2015.2 14
  P0007R1 as_const()  P0007R1 as_const() VS 2015.2 14VS 2015.2 14
  P0013R1 逻辑运算符类型特征(conjunction 等)  P0013R1 Logical Operator Type Traits (conjunction, etc.) VS 2015.2 14VS 2015.2 14
  P0074R0 owner_less<>  P0074R0 owner_less<> VS 2015.2 14VS 2015.2 14
  P0092R1 <chrono> floor()、ceil()、round()、abs()  P0092R1 <chrono> floor(), ceil(), round(), abs() VS 2015.2 14VS 2015.2 14
  P0156R0 可变参数 lock_guard  P0156R0 Variadic lock_guard VS 2015.2 14VS 2015.2 14
  N3911 void_t  N3911 void_t VS 2015 14VS 2015 14
  N4089 unique_ptr<T[]> 中的安全转换  N4089 Safe Conversions In unique_ptr<T[]> VS 2015 14VS 2015 14
  N4169 invoke()  N4169 invoke() VS 2015 14VS 2015 14
  N4190 删除 auto_ptr、random_shuffle() 和旧的 <功能> 内容  N4190 Removing auto_ptr, random_shuffle(), And Old <functional> Stuff VS 2015 remVS 2015 rem
  N4258 noexcept 清理  N4258 noexcept Cleanups VS 2015 14VS 2015 14
  N4259 uncaught_exceptions()  N4259 uncaught_exceptions() VS 2015 14VS 2015 14
  N4277 可完全复制的 reference_wrapper  N4277 Trivially Copyable reference_wrapper VS 2015 14VS 2015 14
  N4279 map/unordered_map 的 insert_or_assign()/try_emplace()  N4279 insert_or_assign()/try_emplace() For map/unordered_map VS 2015 14VS 2015 14
  N4280 size()、empty()、data()  N4280 size(), empty(), data() VS 2015 14VS 2015 14
  N4366 精确限制 unique_ptr 分配  N4366 Precisely Constraining unique_ptr Assignment VS 2015 14VS 2015 14
  N4389 bool_constant  N4389 bool_constant VS 2015 14VS 2015 14
  P0063R3 C11 标准库  P0063R3 C11 Standard Library VS 2015 C1114VS 2015 C11, 14
  N4510 支持 vector/list/forward_list 中的不完整类型  N4510 Supporting Incomplete Types In vector/list/forward_list VS 2013 14VS 2013 14
C++14 标准库功能C++14 Standard Library Features 支持Supported
  N3462 SFINAE 友好的 result_of  N3462 SFINAE-Friendly result_of VS 2015.2VS 2015.2
  N3302 <complex> 的 constexpr  N3302 constexpr For <complex> VS 2015VS 2015
  N3469 <chrono> 的 constexpr  N3469 constexpr For <chrono> VS 2015VS 2015
  N3470 <数组> 的 constexpr  N3470 constexpr For <array> VS 2015VS 2015
  N3471 <initializer_list>、<tuple> 和 <utility> 的 constexpr  N3471 constexpr For <initializer_list>, <tuple>, <utility> VS 2015VS 2015
  N3545 integral_constant::operator()()  N3545 integral_constant::operator()() VS 2015VS 2015
  N3642 <chrono>、<字符串>(1729ms、“meow”s 等)的 UDL  N3642 UDLs For <chrono>, <string> (1729ms, "meow"s, etc.) VS 2015VS 2015
  N3644 Null 向前迭代器  N3644 Null Forward Iterators VS 2015VS 2015
  N3654 quoted()  N3654 quoted() VS 2015VS 2015
  N3657 异类关联查找  N3657 Heterogeneous Associative Lookup VS 2015VS 2015
  N3658 integer_sequence  N3658 integer_sequence VS 2015VS 2015
  N3659 shared_mutex(定时)  N3659 shared_mutex (Timed) VS 2015VS 2015
  N3668 exchange()  N3668 exchange() VS 2015VS 2015
  N3669 修复不包含常量的 constexpr 成员函数  N3669 Fixing constexpr Member Functions Without const VS 2015VS 2015
  N3670 get<T>()  N3670 get<T>() VS 2015VS 2015
  N3671 Dual-Range equal()、is_permutation()、mismatch()  N3671 Dual-Range equal(), is_permutation(), mismatch() VS 2015VS 2015
  N3778 调整大小的释放  N3778 Sized Deallocation VS 2015VS 2015
  N3779 <complex>(3.14i 等)的 UDL  N3779 UDLs For <complex> (3.14i, etc.) VS 2015VS 2015
  N3789 <功能> 的 constexpr  N3789 constexpr For <functional> VS 2015VS 2015
  N3887 tuple_element_t  N3887 tuple_element_t VS 2015VS 2015
  N3891 将 shared_mutex(定时)重命名为 shared_timed_mutex  N3891 Renaming shared_mutex (Timed) To shared_timed_mutex VS 2015VS 2015
  N3346 容器元素的最低要求  N3346 Minimal Container Element Requirements VS 2013VS 2013
  N3421 透明运算符函子(小于<> 等)  N3421 Transparent Operator Functors (less<>, etc.) VS 2013VS 2013
  N3655 <type_traits>(decay_t 等)的别名模板  N3655 Alias Templates For <type_traits> (decay_t, etc.) VS 2013VS 2013
  N3656 make_unique()  N3656 make_unique() VS 2013VS 2013
  N3924 阻止 rand()  N3924 Discouraging rand() 不可用N/A

一起列出的一组文章表明某项功能已被选择加入到标准版中,同时也选择加入了一篇或多篇改进和扩展该功能的文章。A group of papers listed together indicates that a feature was voted into the Standard, and then one or more papers to improve or expand that feature were also voted in. 这些功能可一起实现。These features are implemented together.

支持的值Supported values

否__表示尚未实现。__No means not yet implemented.
部分支持__意味着尚未在 Visual Studio 2017 中完全实现。__Partial means the implementation in Visual Studio 2017 is incomplete. 有关详细信息,请参阅注释部分。For more details, see the Notes section.
N/A 表示建议文章未介绍功能。N/A means the proposal papers do not describe features. 这些文章虽然更改了标准的语言,但没有为实施者创建任何工作。These papers altered the language of the standard, but didn’t create any work for implementers. 在此处将其列出是出于完整性的考虑。They’re listed here for completeness.
VS 2010 表示在 Visual Studio 2010 中支持的功能。VS 2010 indicates features that are supported in Visual Studio 2010.
VS 2013 表示在 Visual Studio 2013 中支持的功能。VS 2013 indicates features that are supported in Visual Studio 2013.
VS 2015 表示在 Visual Studio 2015 RTM 中支持的功能。VS 2015 indicates features that are supported in Visual Studio 2015 RTM.
VS 2015.2VS 2015.3 分别表示在 Visual Studio 2015 Update 2 和 Visual Studio 2015 Update 3 中支持的功能。VS 2015.2 and VS 2015.3 indicate features that are supported in Visual Studio 2015 Update 2 and Visual Studio 2015 Update 3, respectively.
VS 2017 表示在 Visual Studio 2017 RTM 中支持的功能。VS 2017 indicates features that are supported in Visual Studio 2017 RTM.
VS 2017 15.3__表示 Visual Studio 2017 版本 15.3 中支持的功能。__VS 2017 15.3 indicates features that are supported in Visual Studio 2017 version 15.3.
VS 2017 15.5 表示 Visual Studio 2017 版本 15.5 中支持的功能。VS 2017 15.5 indicates features that are supported in Visual Studio 2017 version 15.5.

说明Notes

A 这忽略了 C++03 的动态异常规范,该规范在 C++11 中已弃用。A This ignores C++03’s dynamic exception specifications, which were deprecated in C++11. 没有计划来实现它们,应该会从将来的 C++ 标准版中删除。There is no plan to implement them, in expectation they’ll be removed from a future C++ Standard.
B 编译器对两阶段名称查找的支持得到了改进,但仍不完整。B The compiler’s support for two-phase name lookup is improved but remains incomplete.
C 自 Visual Studio 2015 Update 2 后,编译器对表达式 SFINAE 的支持足以满足标准库,但支持仍不完整。C The compiler’s support for Expression SFINAE has been sufficient for the Standard Library since Visual Studio 2015 Update 2, but support remains incomplete.
D 编译器对 C99 预处理器规则的支持在 Visual Studio 2017 中不完整。D The compiler’s support for C99 Preprocessor rules is incomplete in Visual Studio 2017. Variadic 宏受支持,但预处理器的行为存在很多 Bug。Variadic macros are supported, but there are many bugs in the preprocessor’s behavior.
E 它被标记为“不适用”,因为允许但不要求编译器支持扩展的整数类型。E This is marked as Not Applicable because compilers are permitted, but not required, to support extended integer types. 和 GCC 和 Clang 一样,我们选择不支持它们。Like GCC and Clang, we’ve chosen not to support them.
F 与此类似,它被标记为“不适用”,因为允许但不要求编译器实现此优化。F Similarly, this is marked as Not Applicable because compilers are permitted, but not required, to implement this optimization.
G/std:c++14 下受支持,并且出现可禁止的警告。G Supported under /std:c++14 with a suppressible warning.
H 此功能以前在 Visual Studio 2017 版本 15.3 的预览版中可用,但由于发现了 bug,已将其从发行版中删除。H This feature was available in previews of Visual Studio 2017 version 15.3, but because bugs were found, it was removed from the release.
J 在本表中的其他部分对 Visual Studio 2015 中不完整的功能进行了说明。J Features that were not completed in Visual Studio 2015 are broken out elsewhere in this table.
K 出于历史原因,文件系统 TS 在 <experimental/filesystem> 和 <filesystem> 中均可实现,但必须先更正其实现才能移动其命名空间。K The Filesystem TS is implemented in both <experimental/filesystem> and <filesystem> for historical reasons, but its implementation must be corrected before its namespace is moved. 完成此操作前,此功能标记为尚未实现。Until this is completed, the feature is marked as not yet implemented.
L 由编译器内部函数支持。L Supported by a compiler intrinsic. 此内部函数在 Clang 中尚不可用。This intrinsic is not yet available in Clang. 此功能可用,但尚未在 Intellisense 中启用。The feature is available but not yet enabled in Intellisense.
14 即使指定了 /std:c++14(默认值),这些 C++17 功能也始终处于启用状态。14 These C++17 features are always enabled, even when /std:c++14 (the default) is specified. 这是因为在引入 /std 选项之前实现了该功能,或者因为条件实现异常复杂。This is either because the feature was implemented before the introduction of the /std options, or because conditional implementation was undesirably complex.
17 这些功能由 /std:c++17(或 /std:c++latest)编译器选项启用。17 These features are enabled by the /std:c++17 (or /std:c++latest) compiler option.
byte std::byte/std:c++17(或 /std:c++latest)启用,但由于它在某些情况下可能会与 Windows SDK 标头冲突,因此它具有细化的选择退出宏。byte std::byte is enabled by /std:c++17 (or /std:c++latest), but because it can conflict with the Windows SDK headers in some cases, it has a fine-grained opt-out macro. 可以通过将 _HAS_STD_BYTE 定义为 0 将其禁用。It can be disabled by defining _HAS_STD_BYTE as 0.
C11 通用 CRT 实现了 C++17 所需的部分 C11 标准库,不包括 C99 strftime() E/O 备用转换说明符、C11 fopen() 独占模式和 C11 aligned_alloc()C11 The Universal CRT implemented the parts of the C11 Standard Library that are required by C++17, with the exception of C99 strftime() E/O alternative conversion specifiers, C11 fopen() exclusive mode, and C11 aligned_alloc(). 后者不太可能实现,因为 C11 以与 free() 的 Microsoft 实现不兼容的方式指定了 aligned_alloc(),即 free() 必须能够处理高度一致的分配。The latter is unlikely to be implemented, because C11 specified aligned_alloc() in a way that's incompatible with the Microsoft implementation of free(), namely, that free() must be able to handle highly aligned allocations.
指定 /std:c++17(或 /std:c++latest)编译器选项后会删除 rem 功能。rem Features removed when the /std:c++17 (or /std:c++latest) compiler option is specified. 这些功能具有选择退出宏:_HAS_AUTO_PTR_ETC_HAS_FUNCTION_ALLOCATOR_SUPPORT_HAS_OLD_IOSTREAMS_MEMBERS_HAS_UNEXPECTEDThese features have opt-out macros: _HAS_AUTO_PTR_ETC, _HAS_FUNCTION_ALLOCATOR_SUPPORT, _HAS_OLD_IOSTREAMS_MEMBERS, and _HAS_UNEXPECTED.

请参阅See also

C++ 语言参考C++ Language Reference
C++ 标准库 C++ Standard Library
Visual Studio 2017 中 C++ 的符合性改进C++ conformance improvements in Visual Studio 2017
Visual Studio 2017 中 Visual C++ 的新增功能What's New for Visual C++ in Visual Studio 2017
Visual C++ 更改历史记录(2003 - 2015)Visual C++ change history 2003 through 2015
Visual C++ 新增功能(2003 - 2015)Visual C++ What's New 2003 through 2015
Visual C++ 团队博客Visual C++ team blog