首页IT科技程序即正义是谁说的(程序即人生 » 移动平台现在可用的C++ 11特性)

程序即正义是谁说的(程序即人生 » 移动平台现在可用的C++ 11特性)

时间2025-05-03 19:49:47分类IT科技浏览6633
导读:移动平台现在可用的C++ 11特性...

移动平台现在可用的C++ 11特性

移动平台特指iOS和Android              ,并且Android使用的是NDK,因为开发的时候是在Win32平台下                  ,所以还需要考虑VS的支持            。

当前(2011-12-21)最新的版本:

Win32: Visual Studio 2010

Android NDK: GCC 4.4.3

iOS: Apple LLVM compiler 3.0(Clang)

本文所描述的C++ 11特性仅在上述三个平台      ,所写的版本号中有效           ,请先确认这点                    。

在apache的WIKI上有个较为详细的列表      。可以看到                  ,现在能用的特性其实不怎么多:

auto decltype extern template long long New function declaration syntax for deduced return types Right Angle Brackets R-Value References static_assert Built-in Type Traits

如下图:

上面是整体的描述         ,具体的各个编译器对C++ 11的支持情况见下面的链接:

Win32:
Visual Studio 2010支持情况:C++0x Core Language Features In VC10: The Table
Lambdas, auto, and static_assert: C++0x Features in VC10, Part 1
Rvalue References: C++0x Features in VC10, Part 2
decltype: C++0x Features in VC10, Part 3
Visual Studio 2011支持情况:C++11 Features in Visual C++ 11
Android NDK: GCC 4.4.3

Status of Experimental C++0x Support in GCC 4.4

C++0x/C++11 Support in GCC

iOS:

Apple LLVM compiler 3.0(Clang):C++ and C++’11 Support in Clang

The LLVM Compiler Infrastructure

使用方式:

1.Build Options选择Apple LLVM compiler 3.0

2.            ”Apple LLVM compiler 3.0 – Language                    ”中      ”C++ Language Dialect         ”选择“C++0x                    ” (

3.         ”C++ Standard Library      ”选择libc++(LLVM C++ standard library with C++ ’0X support)                    ” (默认为             ”Compiler Default   ”)

其他有意思的东西:

“libc++                   ” C++ Standard Library

在线试用LLVM编译器

最新修改的原文所在地址         。

声明:本站所有文章        ,如无特殊说明或标注                   ,均为本站原创发布                    。任何个人或组织            ,在未征得本站同意时    ,禁止复制              、盗用                  、采集      、发布本站内容到任何网站           、书籍等各类媒体平台         。如若本站内容侵犯了原著者的合法权益                    ,可联系我们进行处理      。

创心域SEO版权声明:以上内容作者已申请原创保护,未经允许不得转载,侵权必究!授权事宜、对本内容有异议或投诉,敬请联系网站管理员,我们将尽快回复您,谢谢合作!

展开全文READ MORE
pvscan --cache(pvck命令 – 检测物理卷LVM元数据一致性) seo网站排名优化公司哪家(拥有绝佳技术与经验的SEO整站优化专家)