我可以使用XCode 4或OSX Lion中C ++ 11的最新功能吗? [英] Can i use the latest features of C++11 in XCode 4 or OSX Lion?

查看:112
本文介绍了我可以使用XCode 4或OSX Lion中C ++ 11的最新功能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

我可以使用C ++ 11和Xcode?

看起来xcode 4包含clang和gcc的旧版本。我可以升级gcc或铛和使用它们与xcode 4?我想使用gcc> = 4.6或最新的clang。

It seems like xcode 4 contains older versions of clang and gcc. Can i uppgrade gcc or clang and use them with xcode 4? I would like to use gcc >= 4.6 or the latest clang.

我的主要目标是能够从C ++ 11中获得尽可能多的新功能

My main goal is to be able to have as much of the new features from C++11 available when programming C++ on mac osx lion so ditching xcode is also an option if that is needed.

我的选项是什么来实现这个?

What are my options to achieve this?

推荐答案

Xcode 4.1中的clang版本支持一些C ++ 11功能,包括可变模板和右值引用。还有libc ++,Lion中包含了C ++ 11标准库的实现。

The version of clang in Xcode 4.1 does support some C++11 features, including variadic templates and rvalue references. Also libc++, an implementation of the C++11 standard library is included in Lion.

查看我的回答 Osx Lion:Xcode 4.1如何设置c ++ 0x项目< a>

See my answer to Osx Lion: Xcode 4.1 how do I setup a c++0x project for details on setting this up.

这篇关于我可以使用XCode 4或OSX Lion中C ++ 11的最新功能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆