[libcxx] r188080 - Add a check for arrays of unknown bounds to is_destructible. This fixes http://llvm.org/bugs/show_bug.cgi?id=16839
Howard Hinnant
hhinnant at apple.com
Fri Aug 9 09:53:45 PDT 2013
Author: hhinnant
Date: Fri Aug 9 11:53:45 2013
New Revision: 188080
URL: http://llvm.org/viewvc/llvm-project?rev=188080&view=rev
Log:
Add a check for arrays of unknown bounds to is_destructible. This fixes http://llvm.org/bugs/show_bug.cgi?id=16839
Modified:
libcxx/trunk/include/type_traits
libcxx/trunk/test/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp
Modified: libcxx/trunk/include/type_traits
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/type_traits?rev=188080&r1=188079&r2=188080&view=diff
==============================================================================
--- libcxx/trunk/include/type_traits (original)
+++ libcxx/trunk/include/type_traits Fri Aug 9 11:53:45 2013
@@ -1461,6 +1461,10 @@ template <class _Tp>
struct is_destructible
: public __destructible_imp<_Tp> {};
+template <class _Tp>
+struct is_destructible<_Tp[]>
+ : public false_type {};
+
// move
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
Modified: libcxx/trunk/test/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp?rev=188080&r1=188079&r2=188080&view=diff
==============================================================================
--- libcxx/trunk/test/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp (original)
+++ libcxx/trunk/test/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp Fri Aug 9 11:53:45 2013
@@ -69,7 +69,9 @@ int main()
test_is_destructible<const int*>();
test_is_destructible<char[3]>();
test_is_destructible<bit_zero>();
+ test_is_destructible<int[3]>();
+ test_is_not_destructible<int[]>();
test_is_not_destructible<void>();
test_is_not_destructible<Abstract>();
#if __has_feature(cxx_access_control_sfinae)
More information about the cfe-commits
mailing list