summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/instantiate-expr-4.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-05-21 18:55:48 +0000
committerDouglas Gregor <dgregor@apple.com>2009-05-21 18:55:48 +0000
commit31c7e9940192127e08b2e42c68b1edbf0031ee45 (patch)
tree8406ef739bd2fd61fec4dfa0a4634e4d9391f702 /clang/test/SemaTemplate/instantiate-expr-4.cpp
parentcd1a88da02c22e27fc4a4aa077fd5ffb4df62c5c (diff)
downloadbcm5719-llvm-31c7e9940192127e08b2e42c68b1edbf0031ee45.tar.gz
bcm5719-llvm-31c7e9940192127e08b2e42c68b1edbf0031ee45.zip
Template instantiation for unary type traits, e.g., __is_pod
llvm-svn: 72220
Diffstat (limited to 'clang/test/SemaTemplate/instantiate-expr-4.cpp')
-rw-r--r--clang/test/SemaTemplate/instantiate-expr-4.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/instantiate-expr-4.cpp b/clang/test/SemaTemplate/instantiate-expr-4.cpp
index 1511c7aaf8f..5c32d8c1976 100644
--- a/clang/test/SemaTemplate/instantiate-expr-4.cpp
+++ b/clang/test/SemaTemplate/instantiate-expr-4.cpp
@@ -139,3 +139,14 @@ struct Abstract {
template struct TypeId0<int>;
template struct TypeId0<Incomplete>;
template struct TypeId0<Abstract>;
+
+// ---------------------------------------------------------------------
+// type traits
+// ---------------------------------------------------------------------
+template<typename T>
+struct is_pod {
+ static const bool value = __is_pod(T);
+};
+
+static const int is_pod0[is_pod<X>::value? -1 : 1];
+static const int is_pod1[is_pod<Y>::value? 1 : -1];
OpenPOWER on IntegriCloud