diff options
author | Eric Fiselier <eric@efcs.ca> | 2017-03-01 01:27:14 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2017-03-01 01:27:14 +0000 |
commit | 67f7a781263dad0b1ea54eb2d2afb00f2fd938ef (patch) | |
tree | 4c9152409ecdde1c57fbc4b0f2fc82ca4cd5a2bb /test/std/utilities | |
parent | 0268c19d723847b9c2973b577f67324449a01957 (diff) | |
download | external_libcxx-67f7a781263dad0b1ea54eb2d2afb00f2fd938ef.tar.gz external_libcxx-67f7a781263dad0b1ea54eb2d2afb00f2fd938ef.tar.bz2 external_libcxx-67f7a781263dad0b1ea54eb2d2afb00f2fd938ef.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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@296561 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/std/utilities')
-rw-r--r-- | test/std/utilities/meta/meta.unary/meta.unary.prop/is_abstract.pass.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_abstract.pass.cpp b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_abstract.pass.cpp index a54adf102..99ca74cc2 100644 --- a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_abstract.pass.cpp +++ b/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> >(); } |