Features: Add cxx_default_function_template_args.
This commit is contained in:
parent
7b3e8a0534
commit
adf22f611e
|
@ -52,6 +52,11 @@ The features known to this version of CMake are:
|
||||||
|
|
||||||
.. _N2343: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2343.pdf
|
.. _N2343: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2343.pdf
|
||||||
|
|
||||||
|
``cxx_default_function_template_args``
|
||||||
|
Default template arguments for function templates, as defined in DR226_
|
||||||
|
|
||||||
|
.. _DR226: http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#226
|
||||||
|
|
||||||
``cxx_defaulted_functions``
|
``cxx_defaulted_functions``
|
||||||
Defaulted functions, as defined in N2346_.
|
Defaulted functions, as defined in N2346_.
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,7 @@ set(_cmake_feature_test_cxx_variadic_templates "${GNU44_CXX11}")
|
||||||
# TODO: Should be supported by GNU 4.3
|
# TODO: Should be supported by GNU 4.3
|
||||||
set(GNU43_CXX11 "${_oldestSupported} && __cplusplus >= 201103L")
|
set(GNU43_CXX11 "${_oldestSupported} && __cplusplus >= 201103L")
|
||||||
set(_cmake_feature_test_cxx_decltype "${GNU43_CXX11}")
|
set(_cmake_feature_test_cxx_decltype "${GNU43_CXX11}")
|
||||||
|
set(_cmake_feature_test_cxx_default_function_template_args "${GNU43_CXX11}")
|
||||||
set(_cmake_feature_test_cxx_right_angle_brackets "${GNU43_CXX11}")
|
set(_cmake_feature_test_cxx_right_angle_brackets "${GNU43_CXX11}")
|
||||||
set(_cmake_feature_test_cxx_rvalue_references "${GNU43_CXX11}")
|
set(_cmake_feature_test_cxx_rvalue_references "${GNU43_CXX11}")
|
||||||
set(_cmake_feature_test_cxx_static_assert "${GNU43_CXX11}")
|
set(_cmake_feature_test_cxx_static_assert "${GNU43_CXX11}")
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
F(cxx_constexpr) \
|
F(cxx_constexpr) \
|
||||||
F(cxx_decltype) \
|
F(cxx_decltype) \
|
||||||
F(cxx_decltype_incomplete_return_types) \
|
F(cxx_decltype_incomplete_return_types) \
|
||||||
|
F(cxx_default_function_template_args) \
|
||||||
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,12 @@
|
||||||
|
|
||||||
|
template<typename T = int>
|
||||||
|
int someFunc()
|
||||||
|
{
|
||||||
|
T t = 0;
|
||||||
|
return t;
|
||||||
|
}
|
||||||
|
|
||||||
|
void otherFunc()
|
||||||
|
{
|
||||||
|
someFunc();
|
||||||
|
}
|
Loading…
Reference in New Issue