From 80e19ac90f90c5f2aef3d8a6a74b3ffd342ecd0e Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Fri, 9 Aug 2013 16:53:45 +0000 Subject: [PATCH] Add a check for arrays of unknown bounds to is_destructible. This fixes http://llvm.org/bugs/show_bug.cgi?id=16839 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188080 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/type_traits | 4 ++++ .../meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp | 2 ++ 2 files changed, 6 insertions(+) diff --git a/include/type_traits b/include/type_traits index 99e34d13..b5eb40d2 100644 --- a/include/type_traits +++ b/include/type_traits @@ -1461,6 +1461,10 @@ template struct is_destructible : public __destructible_imp<_Tp> {}; +template +struct is_destructible<_Tp[]> + : public false_type {}; + // move #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp index cc7f75eb..b4432dff 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp @@ -69,7 +69,9 @@ int main() test_is_destructible(); test_is_destructible(); test_is_destructible(); + test_is_destructible(); + test_is_not_destructible(); test_is_not_destructible(); test_is_not_destructible(); #if __has_feature(cxx_access_control_sfinae)