summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-03-01 01:27:14 +0000
committerEric Fiselier <eric@efcs.ca>2017-03-01 01:27:14 +0000
commit1ad881c3e46d17178342bd238c44bd1f35a570a8 (patch)
tree90f75fd6e70a7897f5d74dbe24f1b9314ef2fb60 /libcxx/test/std/utilities
parentb75c5c564cbe0d5bab6982264ce78501fd7da3a9 (diff)
downloadbcm5719-llvm-1ad881c3e46d17178342bd238c44bd1f35a570a8.tar.gz
bcm5719-llvm-1ad881c3e46d17178342bd238c44bd1f35a570a8.zip
Fix PR32097 - is_abstract doesn't work on class templates.
This patch fixes llvm.org/PR32097 by using the __is_abstract builtin type-trait instead of the previous library-only implementation. All supported compilers provide this trait. I've tested as far back as Clang 3.2, GCC 4.6 and MSVC trunk. llvm-svn: 296561
Diffstat (limited to 'libcxx/test/std/utilities')
-rw-r--r--libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_abstract.pass.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_abstract.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_abstract.pass.cpp
index a54adf10258..99ca74cc2fa 100644
--- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_abstract.pass.cpp
+++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_abstract.pass.cpp
@@ -65,6 +65,14 @@ class Abstract
virtual ~Abstract() = 0;
};
+template <class>
+struct AbstractTemplate {
+ virtual void test() = 0;
+};
+
+template <>
+struct AbstractTemplate<double> {};
+
int main()
{
test_is_not_abstract<void>();
@@ -81,4 +89,6 @@ int main()
test_is_not_abstract<NotEmpty>();
test_is_abstract<Abstract>();
+ test_is_abstract<AbstractTemplate<int> >();
+ test_is_not_abstract<AbstractTemplate<double> >();
}
OpenPOWER on IntegriCloud