summaryrefslogtreecommitdiff
path: root/TestPrograms
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2020-08-06 06:40:16 -0400
committerJeffrey Walton <noloader@gmail.com>2020-08-06 06:40:16 -0400
commitfdb977a2c691f87903f4db4c25882b4c95bea406 (patch)
tree7cfaa91b7fc8b5b2b1cd42940c0f945083b85ca0 /TestPrograms
parent36c9ecd66dafaac43ca0622a3f5e52dae05ec956 (diff)
downloadcryptopp-git-fdb977a2c691f87903f4db4c25882b4c95bea406.tar.gz
Add C++11 auto feature detection
Diffstat (limited to 'TestPrograms')
-rw-r--r--TestPrograms/test_cxx11_auto.cxx5
-rw-r--r--TestPrograms/test_cxx98_exception.cxx12
2 files changed, 17 insertions, 0 deletions
diff --git a/TestPrograms/test_cxx11_auto.cxx b/TestPrograms/test_cxx11_auto.cxx
new file mode 100644
index 00000000..190f9aaa
--- /dev/null
+++ b/TestPrograms/test_cxx11_auto.cxx
@@ -0,0 +1,5 @@
+int main(int argc, char* argv[])
+{
+ auto a = 1 + 2;
+ return 0;
+}
diff --git a/TestPrograms/test_cxx98_exception.cxx b/TestPrograms/test_cxx98_exception.cxx
new file mode 100644
index 00000000..4af903d4
--- /dev/null
+++ b/TestPrograms/test_cxx98_exception.cxx
@@ -0,0 +1,12 @@
+#include <exception>
+struct S {
+ S() {}
+ virtual ~S() {
+ bool b = std::uncaught_exception();
+ }
+};
+int main(int argc, char* argv[])
+{
+ S s;
+ return 0;
+}