aboutsummaryrefslogtreecommitdiffstats
path: root/c++11/demo.cpp
diff options
context:
space:
mode:
authorAlec Thomas <alec@swapoff.org>2012-10-18 13:21:06 -0400
committerAlec Thomas <alec@swapoff.org>2012-10-18 13:21:06 -0400
commit92dc19d8a0eaea4aac6327490695420deb226218 (patch)
tree03d16ac15fb4acf9704a347df639de0a76152f2f /c++11/demo.cpp
parentd6c7bd8997458658dc4853c36c982acd92966875 (diff)
Add C++11 feature checking to cmake.
Diffstat (limited to 'c++11/demo.cpp')
-rw-r--r--c++11/demo.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/c++11/demo.cpp b/c++11/demo.cpp
new file mode 100644
index 0000000..782681b
--- /dev/null
+++ b/c++11/demo.cpp
@@ -0,0 +1,23 @@
+
+#include <iostream>
+
+int main()
+{
+ std::cout << "Testing\n";
+ std::cout << "Has static_assert: " <<
+#ifdef HAS_CXX11_STATIC_ASSERT
+ "yes :)"
+#else
+ "no"
+#endif
+ << "\n";
+ std::cout << "Has variadic templates: " <<
+#ifdef HAS_CXX11_VARIADIC_TEMPLATES
+ "yes :)"
+#else
+ "no"
+#endif
+ << "\n";
+ return 0;
+}
+