Features: Add cxx_constexpr.
This commit is contained in:
parent
10f33eee1d
commit
91289312fa
|
@ -17,6 +17,11 @@ The features known to this version of CMake are:
|
|||
|
||||
.. _N1984: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1984.pdf
|
||||
|
||||
``cxx_constexpr``
|
||||
Constant expressions, as defined in N2235_.
|
||||
|
||||
.. _N2235: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf
|
||||
|
||||
``cxx_delegating_constructors``
|
||||
Delegating constructors, as defined in N1986_.
|
||||
|
||||
|
|
|
@ -10,6 +10,9 @@ set(_cmake_feature_test_cxx_delegating_constructors "${GNU47_CXX11}")
|
|||
# support -std=c++11. Prior to that, support for C++11 features is technically
|
||||
# experiemental and possibly incomplete (see for example the note below about
|
||||
# cxx_variadic_template_template_parameters)
|
||||
# TODO: Should be supported by GNU 4.6
|
||||
set(GNU46_CXX11 "${_oldestSupported} && __cplusplus >= 201103L")
|
||||
set(_cmake_feature_test_cxx_constexpr "${GNU46_CXX11}")
|
||||
# TODO: Should be supported by GNU 4.4
|
||||
set(GNU44_CXX11 "${_oldestSupported} && __cplusplus >= 201103L")
|
||||
set(_cmake_feature_test_cxx_auto_type "${GNU44_CXX11}")
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
|
||||
#define FOR_EACH_CXX_FEATURE(F) \
|
||||
F(cxx_auto_type) \
|
||||
F(cxx_constexpr) \
|
||||
F(cxx_delegating_constructors) \
|
||||
F(cxx_variadic_templates)
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
constexpr int getNum()
|
||||
{
|
||||
return 42;
|
||||
}
|
Loading…
Reference in New Issue