Features: Add cxx_decltype_incomplete_return_types.
This commit is contained in:
parent
1889045ca6
commit
9a49fd21be
|
@ -42,6 +42,11 @@ The features known to this version of CMake are:
|
||||||
|
|
||||||
.. _N2235: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf
|
.. _N2235: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf
|
||||||
|
|
||||||
|
``cxx_decltype_incomplete_return_types``
|
||||||
|
Decltype on incomplete return types, as defined in N3276_.
|
||||||
|
|
||||||
|
.. _N3276 : http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3276.pdf
|
||||||
|
|
||||||
``cxx_decltype``
|
``cxx_decltype``
|
||||||
Decltype, as defined in N2343_.
|
Decltype, as defined in N2343_.
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,9 @@
|
||||||
|
|
||||||
set(_oldestSupported "(__GNUC__ * 100 + __GNUC_MINOR__) >= 408")
|
set(_oldestSupported "(__GNUC__ * 100 + __GNUC_MINOR__) >= 408")
|
||||||
# Introduced in GCC 4.8.1
|
# Introduced in GCC 4.8.1
|
||||||
set(_cmake_feature_test_cxx_reference_qualified_functions
|
set(GNU481_CXX11 "((__GNUC__ * 100 + __GNUC_MINOR__) > 408 || __GNUC_PATCHLEVEL__ >= 1) && __cplusplus >= 201103L")
|
||||||
"((__GNUC__ * 100 + __GNUC_MINOR__) > 408 || __GNUC_PATCHLEVEL__ >= 1) && __cplusplus >= 201103L")
|
set(_cmake_feature_test_cxx_decltype_incomplete_return_types "${GNU481_CXX11}")
|
||||||
|
set(_cmake_feature_test_cxx_reference_qualified_functions "${GNU481_CXX11}")
|
||||||
set(GNU48_CXX11 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L")
|
set(GNU48_CXX11 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L")
|
||||||
set(_cmake_feature_test_cxx_alignas "${GNU48_CXX11}")
|
set(_cmake_feature_test_cxx_alignas "${GNU48_CXX11}")
|
||||||
set(_cmake_feature_test_cxx_alignof "${GNU48_CXX11}")
|
set(_cmake_feature_test_cxx_alignof "${GNU48_CXX11}")
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
F(cxx_auto_type) \
|
F(cxx_auto_type) \
|
||||||
F(cxx_constexpr) \
|
F(cxx_constexpr) \
|
||||||
F(cxx_decltype) \
|
F(cxx_decltype) \
|
||||||
|
F(cxx_decltype_incomplete_return_types) \
|
||||||
F(cxx_defaulted_functions) \
|
F(cxx_defaulted_functions) \
|
||||||
F(cxx_delegating_constructors) \
|
F(cxx_delegating_constructors) \
|
||||||
F(cxx_deleted_functions) \
|
F(cxx_deleted_functions) \
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
struct A
|
||||||
|
{
|
||||||
|
~A() = delete;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<class T> auto h() -> A<T>;
|
||||||
|
template<class T> auto i(T) -> T;
|
||||||
|
template<class T> auto f(T) -> decltype(i(h<T>()));
|
||||||
|
template<class T> auto f(T) -> void;
|
||||||
|
auto g() -> void {
|
||||||
|
f(42);
|
||||||
|
}
|
Loading…
Reference in New Issue