久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

我可以在 Xcode 中使用 C++11 嗎?

Can I use C++11 with Xcode?(我可以在 Xcode 中使用 C++11 嗎?)
本文介紹了我可以在 Xcode 中使用 C++11 嗎?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我正在考慮在一些跨平臺項目(Windows+Mac)中使用一些 C++11 特性(例如 auto).在 Windows 上,Visual Studio 支持即將推出的 C++11 標準的部分內容,這將使我能夠簡化部分代碼庫,因此我自然會對開始使用這些功能感興趣.

I am considering the use of some C++11 features (like auto for instance) in some cross-platform projects (Windows+Mac). On Windows, Visual Studio supports parts of the upcoming C++11 standard that would allow me to simplify parts of the code base so naturally I would be interested in starting to use these features.

但據我所知,當前的 XCode 版本(3.2.4 + GCC 4.2)根本不支持任何 C++11 功能.我可以以某種方式升級 GCC 版本或 CLang 版本嗎?或者我應該咬咬牙,等蘋果在未來某個時候打包一個新版本?

But as far as I am aware, the current XCode version (3.2.4 + GCC 4.2) does not support any C++11 features at all. Can I upgrade the GCC version or the CLang version somehow? Or should I just bite my tongue and wait for Apple to package a new version sometime in the future?

推薦答案

Xcode 4.2 終于添加了對 C++0X 的支持:

Xcode 4.2 had finally added support for C++0X:

  1. 在項目構建設置屏幕中,打開所有"選項.

  1. In the project build settings screen, switch on "All" options.

在構建選項"部分,將編譯器設置為Apple LLVM 編譯器 3.0".

In the "Build Options" section, set compiler to "Apple LLVM compiler 3.0".

向下滾動到Apple LLVM Compiler 3.0 - Language"部分,將C++ Language Dialect"設置為C++0X",將C++ Standard Library"設置為libc++".

Scroll down to "Apple LLVM Compiler 3.0 - Language" section and set "C++ Language Dialect" to "C++0X" and "C++ Standard Library" to "libc++".

已知 std::move()、移動構造函數和 R 值引用按預期工作,我正在測試 std::thread 和 std::atomic.

The std::move(), move constructor and R-Value reference are known to work as expected, and I'm testing on the std::thread and std::atomic.

這篇關于我可以在 Xcode 中使用 C++11 嗎?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

What is the fastest way to transpose a matrix in C++?(在 C++ 中轉置矩陣的最快方法是什么?)
Sorting zipped (locked) containers in C++ using boost or the STL(使用 boost 或 STL 在 C++ 中對壓縮(鎖定)容器進行排序)
Rotating a point about another point (2D)(圍繞另一個點旋轉一個點 (2D))
Image Processing: Algorithm Improvement for #39;Coca-Cola Can#39; Recognition(圖像處理:Coca-Cola Can 識別的算法改進)
How do I construct an ISO 8601 datetime in C++?(如何在 C++ 中構建 ISO 8601 日期時間?)
Sort list using STL sort function(使用 STL 排序功能對列表進行排序)
主站蜘蛛池模板: 亚洲精品字幕在线观看 | 国产一区二区三区久久 | 日韩福利一区 | 成年人免费看视频 | 日韩一区二区三区免费视频 | 午夜精品影院 | 三级在线观看 | 久久久久蜜桃 | 国产成人午夜 | 五月婷综合 | 日韩精品一区在线 | 午夜免费看片 | 国产三级一区 | 亚洲一区精品视频 | 国产伦精品一区二区三区照片 | 久久艳片www.17c.com | 在线一区 | 国产一区二区三区久久 | 精品国产精品三级精品av网址 | 欧美在线观看视频 | 久久免费高清视频 | 亚洲欧美日韩在线 | 国产黄色在线观看 | 黄视频在线播放 | 22精品一区二区三区 | 日韩欧美一级 | 日产毛片 | 一区二区三区高清 | 99国产精品99久久久久久粉嫩 | 婷婷久久久| 色香蕉网 | 97视频在线免费观看 | 免费黄色片视频 | 色哟哟入口国产精品 | 国产三级在线 | 欧美激情一区 | 99精品在线观看 | 你懂的在线网站 | 天天干天天操天天射 | 国产av毛片 | 亚洲综合激情 |