C++ 铿锵++;3.1但Lion Xcode 4.3.3上没有“cxx_lambdas”

C++ 铿锵++;3.1但Lion Xcode 4.3.3上没有“cxx_lambdas”,c++,lambda,c++11,xcode4.3,clang++,C++,Lambda,C++11,Xcode4.3,Clang++,这与clang 3.1有关,但我在这里找不到答案,我在这里说得更具体一些:cxx\u lambdas在我的确切设置中支持clang 3.1 我在OSX Lion 10.7.4上安装了Xcode 4.3.3和最新的命令行工具包(2012年6月11日)。我现在有了clang++3.1版: 基于,我期望功能cxx\u lambdas可用,但这不是我得到的: llins@jupara:~/projects/tests/C++11$ make clang++ -std=c++11 -stdlib=libc

这与clang 3.1有关,但我在这里找不到答案,我在这里说得更具体一些:
cxx\u lambdas
在我的确切设置中支持clang 3.1

我在OSX Lion 10.7.4上安装了Xcode 4.3.3和最新的命令行工具包(2012年6月11日)。我现在有了clang++3.1版:

基于,我期望功能
cxx\u lambdas
可用,但这不是我得到的:

llins@jupara:~/projects/tests/C++11$ make
clang++ -std=c++11 -stdlib=libc++ test_clang_features.cpp -o test_clang_features

llins@jupara:~/projects/tests/C++11$ ./test_clang_features 
FAILED feature tests: 
__has_feature(cxx_constexpr) .................................. FAILED
__has_feature(cxx_generalized_initializers) ................... FAILED
__has_feature(cxx_inheriting_constructors) .................... FAILED
__has_feature(cxx_lambdas) .................................... FAILED
__has_feature(cxx_local_type_template_args) ................... FAILED
__has_feature(cxx_unrestricted_unions) ........................ FAILED
__has_feature(cxx_user_literals) .............................. FAILED
以下是我运行以获取此报告的代码:

#包括
使用名称空间std;
void main()
{

Xcode 4.4+将提供对Lambada的支持

正如ildjarn指出的那样,Apple的clang/llvm发行版是定制的…

Apple clang 3.1版与
clang 3.1版不一样。感谢Apple让版本控制变得如此简单。
llins@jupara:~/projects/tests/C++11$ make
clang++ -std=c++11 -stdlib=libc++ test_clang_features.cpp -o test_clang_features

llins@jupara:~/projects/tests/C++11$ ./test_clang_features 
FAILED feature tests: 
__has_feature(cxx_constexpr) .................................. FAILED
__has_feature(cxx_generalized_initializers) ................... FAILED
__has_feature(cxx_inheriting_constructors) .................... FAILED
__has_feature(cxx_lambdas) .................................... FAILED
__has_feature(cxx_local_type_template_args) ................... FAILED
__has_feature(cxx_unrestricted_unions) ........................ FAILED
__has_feature(cxx_user_literals) .............................. FAILED
cxx_access_control_sfinae cxx_alias_templates cxx_alignas
cxx_attributes cxx_auto_type cxx_constexpr cxx_decltype
cxx_default_function_template_args cxx_defaulted_functions
cxx_delegating_constructors cxx_deleted_functions cxx_exceptions
cxx_explicit_conversions cxx_generalized_initializers
cxx_implicit_moves cxx_inheriting_constructors cxx_inline_namespaces
cxx_lambdas cxx_local_type_template_args cxx_noexcept
cxx_nonstatic_member_init cxx_nullptr cxx_override_control
cxx_range_for cxx_raw_string_literals
cxx_reference_qualified_functions cxx_rtti cxx_rvalue_references
cxx_static_assert cxx_strong_enums cxx_trailing_return
cxx_unicode_literals cxx_unrestricted_unions cxx_user_literals
cxx_variadic_templates