Features: Add cxx_nullptr.

This commit is contained in:
Stephen Kelly 2014-04-03 19:34:47 +02:00
parent 8149fc909f
commit 0fa9bbf1fa
4 changed files with 17 additions and 0 deletions

View File

@ -72,6 +72,11 @@ The features known to this version of CMake are:
.. _N2756: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2756.htm
``cxx_nullptr``
Null pointer, as defined in N2431_.
.. _N2431: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf
``cxx_override``
Override control ``override`` keyword, as defined in N2928_.

View File

@ -19,6 +19,7 @@ set(_cmake_feature_test_cxx_override "${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_nullptr "${GNU46_CXX11}")
# TODO: Should be supported by GNU 4.5
set(GNU45_CXX11 "${_oldestSupported} && __cplusplus >= 201103L")
set(_cmake_feature_test_cxx_explicit_conversions "${GNU45_CXX11}")

View File

@ -54,6 +54,7 @@
F(cxx_lambdas) \
F(cxx_noexcept) \
F(cxx_nonstatic_member_init) \
F(cxx_nullptr) \
F(cxx_override) \
F(cxx_static_assert) \
F(cxx_strong_enums) \

View File

@ -0,0 +1,10 @@
void someFunc(int*)
{
}
void otherFunc()
{
someFunc(nullptr);
}