Features: Add cxx_strong_enums.
This commit is contained in:
parent
0caf08e43e
commit
8d3467636c
@ -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_strong_enums``
|
||||||
|
Strongly typed enums, as defined in N2347_.
|
||||||
|
|
||||||
|
.. _N2347: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf
|
||||||
|
|
||||||
``cxx_trailing_return_types``
|
``cxx_trailing_return_types``
|
||||||
Automatic function return type, as defined in N2541_.
|
Automatic function return type, as defined in N2541_.
|
||||||
|
|
||||||
|
@ -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_strong_enums "${GNU44_CXX11}")
|
||||||
set(_cmake_feature_test_cxx_trailing_return_types "${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
|
||||||
|
@ -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_strong_enums) \
|
||||||
F(cxx_trailing_return_types) \
|
F(cxx_trailing_return_types) \
|
||||||
F(cxx_variadic_templates)
|
F(cxx_variadic_templates)
|
||||||
|
|
||||||
|
7
Tests/CompileFeatures/cxx_strong_enums.cpp
Normal file
7
Tests/CompileFeatures/cxx_strong_enums.cpp
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
enum class Colors
|
||||||
|
{
|
||||||
|
RedColor,
|
||||||
|
GreenColor,
|
||||||
|
BlueColor
|
||||||
|
};
|
Loading…
x
Reference in New Issue
Block a user