Features: Add cxx_defaulted_functions.

This commit is contained in:
Stephen Kelly 2014-04-03 00:12:02 +02:00
parent 7e748417bc
commit 91f3699000
4 changed files with 16 additions and 0 deletions

View File

@ -27,6 +27,11 @@ The features known to this version of CMake are:
.. _N2343: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2343.pdf
``cxx_defaulted_functions``
Defaulted functions, as defined in N2346_.
.. _N2346: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2346.htm
``cxx_delegating_constructors``
Delegating constructors, as defined in N1986_.

View File

@ -18,6 +18,7 @@ set(_cmake_feature_test_cxx_constexpr "${GNU46_CXX11}")
# TODO: Should be supported by GNU 4.4
set(GNU44_CXX11 "${_oldestSupported} && __cplusplus >= 201103L")
set(_cmake_feature_test_cxx_auto_type "${GNU44_CXX11}")
set(_cmake_feature_test_cxx_defaulted_functions "${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_variadic_templates "${GNU44_CXX11}")

View File

@ -45,6 +45,7 @@
F(cxx_auto_type) \
F(cxx_constexpr) \
F(cxx_decltype) \
F(cxx_defaulted_functions) \
F(cxx_delegating_constructors) \
F(cxx_final) \
F(cxx_override) \

View File

@ -0,0 +1,9 @@
struct A {
A() = default;
};
void someFunc()
{
A a;
}