Features: Add cxx_enum_forward_declarations.

This commit is contained in:
Stephen Kelly 2014-04-06 10:37:08 +02:00
parent adf22f611e
commit 16603f7cdb
4 changed files with 15 additions and 0 deletions

View File

@ -72,6 +72,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_enum_forward_declarations``
Enum forward declarations, as defined in N2764_.
.. _N2764: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2764.pdf
``cxx_explicit_conversions``
Explicit conversion operators, as defined in N2437_.

View File

@ -29,6 +29,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_enum_forward_declarations "${GNU46_CXX11}")
set(_cmake_feature_test_cxx_nullptr "${GNU46_CXX11}")
set(_cmake_feature_test_cxx_range_for "${GNU46_CXX11}")
set(_cmake_feature_test_cxx_unrestricted_unions "${GNU46_CXX11}")

View File

@ -54,6 +54,7 @@
F(cxx_defaulted_functions) \
F(cxx_delegating_constructors) \
F(cxx_deleted_functions) \
F(cxx_enum_forward_declarations) \
F(cxx_explicit_conversions) \
F(cxx_extern_templates) \
F(cxx_final) \

View File

@ -0,0 +1,8 @@
enum SomeEnum : short;
void someFunc()
{
SomeEnum value;
int i = value;
}