Features: Add cxx_reference_qualified_functions.
This commit is contained in:
parent
ea9c445f06
commit
b1c5bd5314
|
@ -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_.
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) \
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
struct test{
|
||||
void f() & { }
|
||||
void f() && { }
|
||||
};
|
||||
|
||||
void someFunc(){
|
||||
test t;
|
||||
t.f(); // lvalue
|
||||
test().f(); // rvalue
|
||||
}
|
Loading…
Reference in New Issue