Features: Add cxx_auto_function.

This commit is contained in:
Stephen Kelly 2014-04-04 00:02:14 +02:00
parent 0685ac6edc
commit 0caf08e43e
4 changed files with 12 additions and 0 deletions

View File

@ -42,6 +42,11 @@ The features known to this version of CMake are:
.. _N1720: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.html .. _N1720: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.html
``cxx_trailing_return_types``
Automatic function return type, as defined in N2541_.
.. _N2541: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2541.htm
``cxx_variadic_templates`` ``cxx_variadic_templates``
Variadic templates, as defined in N2242_. Variadic templates, as defined in N2242_.

View File

@ -18,6 +18,7 @@ set(_cmake_feature_test_cxx_constexpr "${GNU46_CXX11}")
# TODO: Should be supported by GNU 4.4 # TODO: Should be supported by GNU 4.4
set(GNU44_CXX11 "${_oldestSupported} && __cplusplus >= 201103L") set(GNU44_CXX11 "${_oldestSupported} && __cplusplus >= 201103L")
set(_cmake_feature_test_cxx_auto_type "${GNU44_CXX11}") set(_cmake_feature_test_cxx_auto_type "${GNU44_CXX11}")
set(_cmake_feature_test_cxx_trailing_return_types "${GNU44_CXX11}")
set(_cmake_feature_test_cxx_variadic_templates "${GNU44_CXX11}") set(_cmake_feature_test_cxx_variadic_templates "${GNU44_CXX11}")
# TODO: If features are ever recorded for GNU 4.3, there should possibly # TODO: If features are ever recorded for GNU 4.3, there should possibly
# be a new feature added like cxx_variadic_template_template_parameters, # be a new feature added like cxx_variadic_template_template_parameters,

View File

@ -48,6 +48,7 @@
F(cxx_final) \ F(cxx_final) \
F(cxx_override) \ F(cxx_override) \
F(cxx_static_assert) \ F(cxx_static_assert) \
F(cxx_trailing_return_types) \
F(cxx_variadic_templates) F(cxx_variadic_templates)
class cmMakefile::Internals class cmMakefile::Internals

View File

@ -0,0 +1,5 @@
auto someFunc() -> int
{
return 42;
}