Visual Studio 2012 中的 C++11 功能

2023-06-04C/C++开发问题
73

本文介绍了Visual Studio 2012 中的 C++11 功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

Visual Studio 2012 的预览版(VS2010 之后的下一个版本)是 现在可用.

A preview version of Visual Studio 2012 (the next version after VS2010) is now available.

有谁知道它支持哪些新的 C++11 特性?(我目前无法尝试).

Does anyone know what new C++11 features it supports? (I'm not in a position to try it out at the moment).

推荐答案

值得注意的是,Visual Studio 2010 已经有相当多的早期 C++11 支持.因此,总结一下其他答案中已经链接的内容,以下是 Visual Studio 11 中不属于 Visual Studio 2010 的新内容:

It's worth noting that Visual Studio 2010 already had quite a bit of early C++11 support. So to summarize what is already linked to in other answers, here is what is new in Visual Studio 11 that was not part of Visual Studio 2010:

  • 对 2.1 版 的右值引用来自2.0
  • lambdas 到 1.1 版从 1.0 开始.
  • decltype 到 1.1 版从 1.0(尚未在开发者预览版中提供)
  • 已改进,但仍不完整,对齐
  • 完成强类型枚举
  • 前向声明的枚举
  • 标准布局和简单类型
  • 原子
  • 强对比和交流
  • 双向围栏
  • 数据依赖排序
  • 基于范围的 for 循环
  • rvalue references to version 2.1 from 2.0
  • lambdas to version 1.1 from 1.0.
  • decltype to version 1.1 from 1.0(not yet available in developer preview)
  • Improved, but still incomplete, Alignment
  • completed strongly-typed enums
  • forward declared enums
  • Standard layout and trivial types
  • Atomics
  • Strong compare and exchange
  • Bi-directional fences
  • Data-dependency ordering
  • Range-based for loop

2012 年 11 月上旬,微软 宣布 Visual C++ Compiler 2012 年 11 月 CTP,为 Visual Studio 2012 添加了更多 C++11 功能:

In early November 2012, Microsoft announced the Visual C++ Compiler November 2012 CTP, which adds more C++11 functionality to Visual Studio 2012:

  • 统一初始化
  • 初始化列表
  • 可变参数模板
  • 函数模板默认参数
  • 委托构造函数莉>
  • 显式转换运算符
  • 原始字符串

这篇关于Visual Studio 2012 中的 C++11 功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

无法访问 C++ std::set 中对象的非常量成员函数
Unable to access non-const member functions of objects in C++ std::set(无法访问 C++ std::set 中对象的非常量成员函数)...
2024-08-14 C/C++开发问题
17

从 lambda 构造 std::function 参数
Constructing std::function argument from lambda(从 lambda 构造 std::function 参数)...
2024-08-14 C/C++开发问题
25

STL BigInt 类实现
STL BigInt class implementation(STL BigInt 类实现)...
2024-08-14 C/C++开发问题
3

使用 std::atomic 和 std::condition_variable 同步不可靠
Sync is unreliable using std::atomic and std::condition_variable(使用 std::atomic 和 std::condition_variable 同步不可靠)...
2024-08-14 C/C++开发问题
17

在 STL 中将列表元素移动到末尾
Move list element to the end in STL(在 STL 中将列表元素移动到末尾)...
2024-08-14 C/C++开发问题
9

为什么禁止对存储在 STL 容器中的类重载 operator&()?
Why is overloading operatoramp;() prohibited for classes stored in STL containers?(为什么禁止对存储在 STL 容器中的类重载 operatoramp;()?)...
2024-08-14 C/C++开发问题
6