Features: Add cxx_sizeof_member.
This commit is contained in:
parent
ab455ebafd
commit
1889045ca6
|
@ -137,6 +137,11 @@ The features known to this version of CMake are:
|
||||||
|
|
||||||
.. _N2118: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2118.html
|
.. _N2118: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2118.html
|
||||||
|
|
||||||
|
``cxx_sizeof_member``
|
||||||
|
Size of non-static data members, as defined in N2253_.
|
||||||
|
|
||||||
|
.. _N2253: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2253.html
|
||||||
|
|
||||||
``cxx_static_assert``
|
``cxx_static_assert``
|
||||||
Static assert, as defined in N1720_.
|
Static assert, as defined in N1720_.
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ set(_cmake_feature_test_cxx_defaulted_functions "${GNU44_CXX11}")
|
||||||
set(_cmake_feature_test_cxx_deleted_functions "${GNU44_CXX11}")
|
set(_cmake_feature_test_cxx_deleted_functions "${GNU44_CXX11}")
|
||||||
set(_cmake_feature_test_cxx_generalized_initializers "${GNU44_CXX11}")
|
set(_cmake_feature_test_cxx_generalized_initializers "${GNU44_CXX11}")
|
||||||
set(_cmake_feature_test_cxx_inline_namespaces "${GNU44_CXX11}")
|
set(_cmake_feature_test_cxx_inline_namespaces "${GNU44_CXX11}")
|
||||||
|
set(_cmake_feature_test_cxx_sizeof_member "${GNU44_CXX11}")
|
||||||
set(_cmake_feature_test_cxx_strong_enums "${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_unicode_literals "${GNU44_CXX11}")
|
set(_cmake_feature_test_cxx_unicode_literals "${GNU44_CXX11}")
|
||||||
|
|
|
@ -67,6 +67,7 @@
|
||||||
F(cxx_raw_string_literals) \
|
F(cxx_raw_string_literals) \
|
||||||
F(cxx_reference_qualified_functions) \
|
F(cxx_reference_qualified_functions) \
|
||||||
F(cxx_rvalue_references) \
|
F(cxx_rvalue_references) \
|
||||||
|
F(cxx_sizeof_member) \
|
||||||
F(cxx_static_assert) \
|
F(cxx_static_assert) \
|
||||||
F(cxx_strong_enums) \
|
F(cxx_strong_enums) \
|
||||||
F(cxx_thread_local) \
|
F(cxx_thread_local) \
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
|
||||||
|
struct A
|
||||||
|
{
|
||||||
|
int m_i;
|
||||||
|
};
|
||||||
|
|
||||||
|
int someFunc()
|
||||||
|
{
|
||||||
|
return sizeof(A::m_i) > 0 ? 1 : 2;
|
||||||
|
}
|
Loading…
Reference in New Issue