summaryrefslogtreecommitdiffstats
path: root/Source/Checks
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Checks')
-rw-r--r--Source/Checks/cm_cxx_features.cmake1
-rw-r--r--Source/Checks/cm_cxx_nullptr.cxx14
2 files changed, 15 insertions, 0 deletions
diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake
index 18dbaf8..6fde7b6 100644
--- a/Source/Checks/cm_cxx_features.cmake
+++ b/Source/Checks/cm_cxx_features.cmake
@@ -32,6 +32,7 @@ function(cm_check_cxx_feature name)
endfunction()
if(CMAKE_CXX_STANDARD)
+ cm_check_cxx_feature(nullptr)
cm_check_cxx_feature(override)
cm_check_cxx_feature(unordered_map)
cm_check_cxx_feature(unordered_set)
diff --git a/Source/Checks/cm_cxx_nullptr.cxx b/Source/Checks/cm_cxx_nullptr.cxx
new file mode 100644
index 0000000..500684a
--- /dev/null
+++ b/Source/Checks/cm_cxx_nullptr.cxx
@@ -0,0 +1,14 @@
+int test(int)
+{
+ return -1;
+}
+
+int test(int*)
+{
+ return 0;
+}
+
+int main()
+{
+ return test(nullptr);
+}