Features: Add cxx_override.
This commit is contained in:
parent
57ac6a905c
commit
0685ac6edc
|
@ -32,6 +32,11 @@ The features known to this version of CMake are:
|
||||||
|
|
||||||
.. _N2928: http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2928.htm
|
.. _N2928: http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2928.htm
|
||||||
|
|
||||||
|
``cxx_override``
|
||||||
|
Override control ``override`` keyword, as defined in N2928_.
|
||||||
|
|
||||||
|
.. _N2928: http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2928.htm
|
||||||
|
|
||||||
``cxx_static_assert``
|
``cxx_static_assert``
|
||||||
Static assert, as defined in N1720_.
|
Static assert, as defined in N1720_.
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ set(_oldestSupported "(__GNUC__ * 100 + __GNUC_MINOR__) >= 408")
|
||||||
set(GNU47_CXX11 "${_oldestSupported} && __cplusplus >= 201103L")
|
set(GNU47_CXX11 "${_oldestSupported} && __cplusplus >= 201103L")
|
||||||
set(_cmake_feature_test_cxx_delegating_constructors "${GNU47_CXX11}")
|
set(_cmake_feature_test_cxx_delegating_constructors "${GNU47_CXX11}")
|
||||||
set(_cmake_feature_test_cxx_final "${GNU47_CXX11}")
|
set(_cmake_feature_test_cxx_final "${GNU47_CXX11}")
|
||||||
|
set(_cmake_feature_test_cxx_override "${GNU47_CXX11}")
|
||||||
# NOTE: C++11 was ratified in September 2011. GNU 4.7 is the first minor
|
# NOTE: C++11 was ratified in September 2011. GNU 4.7 is the first minor
|
||||||
# release following that (March 2012), and the first minor release to
|
# release following that (March 2012), and the first minor release to
|
||||||
# support -std=c++11. Prior to that, support for C++11 features is technically
|
# support -std=c++11. Prior to that, support for C++11 features is technically
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
F(cxx_constexpr) \
|
F(cxx_constexpr) \
|
||||||
F(cxx_delegating_constructors) \
|
F(cxx_delegating_constructors) \
|
||||||
F(cxx_final) \
|
F(cxx_final) \
|
||||||
|
F(cxx_override) \
|
||||||
F(cxx_static_assert) \
|
F(cxx_static_assert) \
|
||||||
F(cxx_variadic_templates)
|
F(cxx_variadic_templates)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
|
||||||
|
struct A {
|
||||||
|
virtual void doNothing() {}
|
||||||
|
};
|
||||||
|
struct B : A {
|
||||||
|
void doNothing() override {}
|
||||||
|
};
|
Loading…
Reference in New Issue