Features: Add cxx_extern_templates.
This commit is contained in:
parent
9064f78b0c
commit
32c2acd65c
@ -52,6 +52,11 @@ The features known to this version of CMake are:
|
||||
|
||||
.. _N2437: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2437.pdf
|
||||
|
||||
``cxx_extern_templates``
|
||||
Extern templates, as defined in N1987_.
|
||||
|
||||
.. _N1987: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1987.htm
|
||||
|
||||
``cxx_final``
|
||||
Override control ``final`` keyword, as defined in N2928_.
|
||||
|
||||
|
@ -53,4 +53,6 @@ set(GNU43_CXX11 "${_oldestSupported} && __cplusplus >= 201103L")
|
||||
set(_cmake_feature_test_cxx_decltype "${GNU43_CXX11}")
|
||||
set(_cmake_feature_test_cxx_rvalue_references "${GNU43_CXX11}")
|
||||
set(_cmake_feature_test_cxx_static_assert "${GNU43_CXX11}")
|
||||
# TODO: Should be supported since GNU 3.4?
|
||||
set(_cmake_feature_test_cxx_extern_templates "${_oldestSupported} && __cplusplus >= 201103L")
|
||||
set(_oldestSupported)
|
||||
|
@ -50,6 +50,7 @@
|
||||
F(cxx_delegating_constructors) \
|
||||
F(cxx_deleted_functions) \
|
||||
F(cxx_explicit_conversions) \
|
||||
F(cxx_extern_templates) \
|
||||
F(cxx_final) \
|
||||
F(cxx_inheriting_constructors) \
|
||||
F(cxx_lambdas) \
|
||||
|
12
Tests/CompileFeatures/cxx_extern_templates.cpp
Normal file
12
Tests/CompileFeatures/cxx_extern_templates.cpp
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
template<typename T>
|
||||
void someFunc()
|
||||
{
|
||||
}
|
||||
|
||||
extern template void someFunc<int>();
|
||||
|
||||
void otherFunc()
|
||||
{
|
||||
someFunc<int>();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user