From fdb977a2c691f87903f4db4c25882b4c95bea406 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Thu, 6 Aug 2020 06:40:16 -0400 Subject: Add C++11 auto feature detection --- TestPrograms/test_cxx11_auto.cxx | 5 +++++ TestPrograms/test_cxx98_exception.cxx | 12 ++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 TestPrograms/test_cxx11_auto.cxx create mode 100644 TestPrograms/test_cxx98_exception.cxx (limited to 'TestPrograms') 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 +struct S { + S() {} + virtual ~S() { + bool b = std::uncaught_exception(); + } +}; +int main(int argc, char* argv[]) +{ + S s; + return 0; +} -- cgit v1.2.1