summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-04-06 09:22:49 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-04-08 09:05:58 (GMT)
commit60c0d2dd812af663b2b009a253072dc481b604fe (patch)
tree99fe4228ce2a1228bd7de5c622de3df284ee073f
parentc4e672358c4945e78234b8c7075924c80750d61b (diff)
downloadCMake-60c0d2dd812af663b2b009a253072dc481b604fe.zip
CMake-60c0d2dd812af663b2b009a253072dc481b604fe.tar.gz
CMake-60c0d2dd812af663b2b009a253072dc481b604fe.tar.bz2
Features: Add cxx_defaulted_move_initializers.
-rw-r--r--Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst5
-rw-r--r--Modules/Compiler/GNU-CXX-FeatureTests.cmake1
-rw-r--r--Source/cmMakefile.cxx1
-rw-r--r--Tests/CompileFeatures/cxx_defaulted_move_initializers.cpp7
4 files changed, 14 insertions, 0 deletions
diff --git a/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst b/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst
index 5f578bb..6d34a2b 100644
--- a/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst
+++ b/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst
@@ -62,6 +62,11 @@ The features known to this version of CMake are:
.. _N2346: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2346.htm
+``cxx_defaulted_move_initializers``
+ Defaulted move initializers, as defined in N3053_.
+
+ .. _N3053: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3053.html
+
``cxx_delegating_constructors``
Delegating constructors, as defined in N1986_.
diff --git a/Modules/Compiler/GNU-CXX-FeatureTests.cmake b/Modules/Compiler/GNU-CXX-FeatureTests.cmake
index c044f17..3f169d2 100644
--- a/Modules/Compiler/GNU-CXX-FeatureTests.cmake
+++ b/Modules/Compiler/GNU-CXX-FeatureTests.cmake
@@ -30,6 +30,7 @@ set(_cmake_feature_test_cxx_user_literals "${GNU47_CXX11}")
# TODO: Should be supported by GNU 4.6
set(GNU46_CXX11 "${_oldestSupported} && __cplusplus >= 201103L")
set(_cmake_feature_test_cxx_constexpr "${GNU46_CXX11}")
+set(_cmake_feature_test_cxx_defaulted_move_initializers "${GNU46_CXX11}")
set(_cmake_feature_test_cxx_enum_forward_declarations "${GNU46_CXX11}")
set(_cmake_feature_test_cxx_nullptr "${GNU46_CXX11}")
set(_cmake_feature_test_cxx_range_for "${GNU46_CXX11}")
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 12f770c..6ec40fb 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -52,6 +52,7 @@
F(cxx_decltype_incomplete_return_types) \
F(cxx_default_function_template_args) \
F(cxx_defaulted_functions) \
+ F(cxx_defaulted_move_initializers) \
F(cxx_delegating_constructors) \
F(cxx_deleted_functions) \
F(cxx_enum_forward_declarations) \
diff --git a/Tests/CompileFeatures/cxx_defaulted_move_initializers.cpp b/Tests/CompileFeatures/cxx_defaulted_move_initializers.cpp
new file mode 100644
index 0000000..14f9871
--- /dev/null
+++ b/Tests/CompileFeatures/cxx_defaulted_move_initializers.cpp
@@ -0,0 +1,7 @@
+
+struct A
+{
+ A() = default;
+ A& operator=(A&&) = default;
+ A(A&&) = default;
+};