summaryrefslogtreecommitdiffstats
path: root/Source/Checks/cm_cxx_unordered_map.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-06-22 22:16:15 (GMT)
committerBrad King <brad.king@kitware.com>2016-06-27 14:37:40 (GMT)
commitea5477e43de4660343897e4669bc5809dc4ddabe (patch)
treea368c8573d3b2c24b713e059e87fa1895604eb39 /Source/Checks/cm_cxx_unordered_map.cxx
parent68bb74d9e651fd44ddeeb81caa59096dbf1f0605 (diff)
downloadCMake-ea5477e43de4660343897e4669bc5809dc4ddabe.zip
CMake-ea5477e43de4660343897e4669bc5809dc4ddabe.tar.gz
CMake-ea5477e43de4660343897e4669bc5809dc4ddabe.tar.bz2
Make C++ feature checks extensible
Turn the feature check for cxx11_unordered_map into a function such that we can use it for other features as well. Drop the 11 suffix, as we may want to check features from other standards.
Diffstat (limited to 'Source/Checks/cm_cxx_unordered_map.cxx')
-rw-r--r--Source/Checks/cm_cxx_unordered_map.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/Checks/cm_cxx_unordered_map.cxx b/Source/Checks/cm_cxx_unordered_map.cxx
new file mode 100644
index 0000000..be3de25
--- /dev/null
+++ b/Source/Checks/cm_cxx_unordered_map.cxx
@@ -0,0 +1,7 @@
+#include <unordered_map>
+int main()
+{
+ std::unordered_map<int, int> map;
+ map[0] = 0;
+ return 0;
+}