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

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

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

問題描述

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

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.

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

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. 在項目構(gòu)建設(shè)置屏幕中,打開所有"選項.

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

在構(gòu)建選項"部分,將編譯器設(shè)置為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"設(shè)置為C++0X",將C++ Standard Library"設(shè)置為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()、移動構(gòu)造函數(shù)和 R 值引用按預(yù)期工作,我正在測試 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.

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

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

相關(guān)文檔推薦

What is the fastest way to transpose a matrix in C++?(在 C++ 中轉(zhuǎn)置矩陣的最快方法是什么?)
Sorting zipped (locked) containers in C++ using boost or the STL(使用 boost 或 STL 在 C++ 中對壓縮(鎖定)容器進行排序)
Rotating a point about another point (2D)(圍繞另一個點旋轉(zhuǎn)一個點 (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++ 中構(gòu)建 ISO 8601 日期時間?)
Sort list using STL sort function(使用 STL 排序功能對列表進行排序)
主站蜘蛛池模板: av香蕉 | 伊人中文网| 日韩毛片在线观看 | 久久久久久免费毛片精品 | 午夜影院 | 精品国产乱码久久久久久丨区2区 | 一区二区播放 | 黄色毛片在线观看 | 日韩欧美在 | 一级全黄少妇性色生活免费看 | 日本一区二区三区四区 | 女人牲交视频一级毛片 | 国产成人一区二区三区 | 黄色中文字幕 | www.色五月.com | 日韩一区二区在线看 | 国产91综合一区在线观看 | 国产精品久久久久久久久久久久 | 在线一级片 | 欧美激情一区二区 | 国产精品久久国产精品久久 | 日韩高清国产一区在线 | re久久| 国产成人在线一区 | 亚洲美女av网站 | 国产高清精品一区二区三区 | 国产视频中文字幕 | 成人国产一区二区三区精品麻豆 | 韩国电影久久 | 日韩电影在线 | 五月天天色 | 激情网五月天 | 日韩精品在线观看一区二区三区 | 国产精品久久久久久久毛片 | 日韩中文电影 | 午夜a√ | 国产一区二区三区四区hd | 国产97久久| 密桃av| 国产激情视频在线观看 | 999久久久久久久久 国产欧美在线观看 |