summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/libstdcxx_is_pod_hack.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/libstdcxx_is_pod_hack.cpp')
-rw-r--r--test/SemaCXX/libstdcxx_is_pod_hack.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/SemaCXX/libstdcxx_is_pod_hack.cpp b/test/SemaCXX/libstdcxx_is_pod_hack.cpp
index 3ac2336..1ba3721 100644
--- a/test/SemaCXX/libstdcxx_is_pod_hack.cpp
+++ b/test/SemaCXX/libstdcxx_is_pod_hack.cpp
@@ -8,6 +8,7 @@
template<typename T>
struct __is_pod {
+ __is_pod() {}
};
__is_pod<int> ipi;
@@ -28,6 +29,13 @@ struct test_is_signed {
bool check_signed = test_is_signed::__is_signed;
-#if __has_feature(is_pod)
-# error __is_pod won't work now anyway
+template<bool B> struct must_be_true {};
+template<> struct must_be_true<false>;
+
+void foo() {
+ bool b = __is_pod(int);
+ must_be_true<__is_pod(int)> mbt;
+}
+#if !__has_feature(is_pod)
+# error __is_pod should still be available.
#endif
OpenPOWER on IntegriCloud