diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-04-04 12:53:25 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-04-08 09:05:56 (GMT) |
commit | 3d76656fb3db56f364bbf7a7655ab1433b72d284 (patch) | |
tree | 98c38814b553f60a7f526281494d8a363c800e76 | |
parent | e74b216c90d33548e7b248276346a5d00eff5ee3 (diff) | |
download | CMake-3d76656fb3db56f364bbf7a7655ab1433b72d284.zip CMake-3d76656fb3db56f364bbf7a7655ab1433b72d284.tar.gz CMake-3d76656fb3db56f364bbf7a7655ab1433b72d284.tar.bz2 |
Features: Add cxx_uniform_initialization.
-rw-r--r-- | Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst | 5 | ||||
-rw-r--r-- | Modules/Compiler/GNU-CXX-FeatureTests.cmake | 1 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 1 | ||||
-rw-r--r-- | Tests/CompileFeatures/cxx_uniform_initialization.cpp | 9 |
4 files changed, 16 insertions, 0 deletions
diff --git a/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst b/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst index 9329968..55521d9 100644 --- a/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst +++ b/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst @@ -152,6 +152,11 @@ The features known to this version of CMake are: .. _N2442: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm +``cxx_uniform_initialization`` + Uniform intialization, as defined in N2640_. + + .. _N2640: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2640.pdf + ``cxx_unrestricted_unions`` Unrestricted unions, as defined in N2544_. diff --git a/Modules/Compiler/GNU-CXX-FeatureTests.cmake b/Modules/Compiler/GNU-CXX-FeatureTests.cmake index fcdffac..a3b4339 100644 --- a/Modules/Compiler/GNU-CXX-FeatureTests.cmake +++ b/Modules/Compiler/GNU-CXX-FeatureTests.cmake @@ -44,6 +44,7 @@ set(_cmake_feature_test_cxx_generalized_initializers "${GNU44_CXX11}") set(_cmake_feature_test_cxx_strong_enums "${GNU44_CXX11}") set(_cmake_feature_test_cxx_trailing_return_types "${GNU44_CXX11}") set(_cmake_feature_test_cxx_unicode_literals "${GNU44_CXX11}") +set(_cmake_feature_test_cxx_uniform_initialization "${GNU44_CXX11}") set(_cmake_feature_test_cxx_variadic_templates "${GNU44_CXX11}") # TODO: If features are ever recorded for GNU 4.3, there should possibly # be a new feature added like cxx_variadic_template_template_parameters, diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index c1d276e..65f9594 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -70,6 +70,7 @@ F(cxx_strong_enums) \ F(cxx_trailing_return_types) \ F(cxx_unicode_literals) \ + F(cxx_uniform_initialization) \ F(cxx_unrestricted_unions) \ F(cxx_user_literals) \ F(cxx_variadic_templates) diff --git a/Tests/CompileFeatures/cxx_uniform_initialization.cpp b/Tests/CompileFeatures/cxx_uniform_initialization.cpp new file mode 100644 index 0000000..82c76e2 --- /dev/null +++ b/Tests/CompileFeatures/cxx_uniform_initialization.cpp @@ -0,0 +1,9 @@ +struct A {}; +struct B { + B(A) {} +}; + +void Func() +{ + B b{A{}}; +} |