From 31c7e9940192127e08b2e42c68b1edbf0031ee45 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Thu, 21 May 2009 18:55:48 +0000 Subject: Template instantiation for unary type traits, e.g., __is_pod llvm-svn: 72220 --- clang/test/SemaTemplate/instantiate-expr-4.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'clang/test/SemaTemplate/instantiate-expr-4.cpp') 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; template struct TypeId0; template struct TypeId0; + +// --------------------------------------------------------------------- +// type traits +// --------------------------------------------------------------------- +template +struct is_pod { + static const bool value = __is_pod(T); +}; + +static const int is_pod0[is_pod::value? -1 : 1]; +static const int is_pod1[is_pod::value? 1 : -1]; -- cgit v1.2.3