Features: Add cxx_reference_qualified_functions.

This commit is contained in:
Stephen Kelly 2014-04-04 09:25:46 +02:00
parent ea9c445f06
commit b1c5bd5314
4 changed files with 20 additions and 0 deletions

View File

@ -92,6 +92,11 @@ The features known to this version of CMake are:
.. _N2442: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm
``cxx_reference_qualified_functions``
Reference qualified functions, as defined in N2439_.
.. _N2439: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2439.htm
``cxx_static_assert``
Static assert, as defined in N1720_.

View File

@ -2,6 +2,9 @@
# Reference: http://gcc.gnu.org/projects/cxx0x.html
set(_oldestSupported "(__GNUC__ * 100 + __GNUC_MINOR__) >= 408")
# Introduced in GCC 4.8.1
set(_cmake_feature_test_cxx_reference_qualified_functions
"((__GNUC__ * 100 + __GNUC_MINOR__) > 408 || __GNUC_PATCHLEVEL__ >= 1) && __cplusplus >= 201103L")
set(GNU48_CXX11 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L")
set(_cmake_feature_test_cxx_inheriting_constructors "${GNU48_CXX11}")
# TODO: Should be supported by GNU 4.7

View File

@ -58,6 +58,7 @@
F(cxx_override) \
F(cxx_range_for) \
F(cxx_raw_string_literals) \
F(cxx_reference_qualified_functions) \
F(cxx_static_assert) \
F(cxx_strong_enums) \
F(cxx_trailing_return_types) \

View File

@ -0,0 +1,11 @@
struct test{
void f() & { }
void f() && { }
};
void someFunc(){
test t;
t.f(); // lvalue
test().f(); // rvalue
}