summaryrefslogtreecommitdiffstats
path: root/Source/Checks/cm_cxx_nullptr.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-06-27 21:23:35 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-06-27 21:24:39 (GMT)
commitb4b73f56a26c1e1d630e3f262d2d4bafee8231c4 (patch)
treed1cd9d291b59476041057b2154693a2c430e228c /Source/Checks/cm_cxx_nullptr.cxx
parenta7a92390964ea5aa7021f71ee69fcc71c4229516 (diff)
downloadCMake-b4b73f56a26c1e1d630e3f262d2d4bafee8231c4.zip
CMake-b4b73f56a26c1e1d630e3f262d2d4bafee8231c4.tar.gz
CMake-b4b73f56a26c1e1d630e3f262d2d4bafee8231c4.tar.bz2
cxx features: add check for nullptr
Diffstat (limited to 'Source/Checks/cm_cxx_nullptr.cxx')
-rw-r--r--Source/Checks/cm_cxx_nullptr.cxx14
1 files changed, 14 insertions, 0 deletions
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);
+}