summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-04-02 13:02:41 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-04-08 09:05:54 (GMT)
commit10f33eee1dfefa9e5a2ee5cf4946095bf08b19bc (patch)
tree79380831c727bb6befad287ca4ca5bdd75bb3c2d /Modules
parent750dfee29c3f45020e8fcff91499a2542913b649 (diff)
downloadCMake-10f33eee1dfefa9e5a2ee5cf4946095bf08b19bc.zip
CMake-10f33eee1dfefa9e5a2ee5cf4946095bf08b19bc.tar.gz
CMake-10f33eee1dfefa9e5a2ee5cf4946095bf08b19bc.tar.bz2
Features: Add cxx_variadic_templates.
Expect cxx_variadic_templates to implement N2555. N2555 is essentially a bugfix and predates most compiler releases which aimed to experimentally support variadic templates.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Compiler/GNU-CXX-FeatureTests.cmake13
1 files changed, 13 insertions, 0 deletions
diff --git a/Modules/Compiler/GNU-CXX-FeatureTests.cmake b/Modules/Compiler/GNU-CXX-FeatureTests.cmake
index 4f14b17..6baa463 100644
--- a/Modules/Compiler/GNU-CXX-FeatureTests.cmake
+++ b/Modules/Compiler/GNU-CXX-FeatureTests.cmake
@@ -5,7 +5,20 @@ set(_oldestSupported "(__GNUC__ * 100 + __GNUC_MINOR__) >= 408")
# TODO: Should be supported by GNU 4.7
set(GNU47_CXX11 "${_oldestSupported} && __cplusplus >= 201103L")
set(_cmake_feature_test_cxx_delegating_constructors "${GNU47_CXX11}")
+# NOTE: C++11 was ratified in September 2011. GNU 4.7 is the first minor
+# release following that (March 2012), and the first minor release to
+# support -std=c++11. Prior to that, support for C++11 features is technically
+# experiemental and possibly incomplete (see for example the note below about
+# cxx_variadic_template_template_parameters)
# TODO: Should be supported by GNU 4.4
set(GNU44_CXX11 "${_oldestSupported} && __cplusplus >= 201103L")
set(_cmake_feature_test_cxx_auto_type "${GNU44_CXX11}")
+set(_cmake_feature_test_cxx_variadic_templates "${GNU44_CXX11}")
+# TODO: If features are ever recorded for GNU 4.3, there should possibly
+# be a new feature added like cxx_variadic_template_template_parameters,
+# which is implemented by GNU 4.4, but not 4.3. cxx_variadic_templates is
+# actually implemented by GNU 4.3, but variadic template template parameters
+# 'completes' it, so that is the version we record as having the variadic
+# templates capability in CMake. See
+# http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2555.pdf
set(_oldestSupported)