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
This commit is contained in:
parent
5ea5d31f6d
commit
80e19ac90f
@ -1461,6 +1461,10 @@ template <class _Tp>
|
|||||||
struct is_destructible
|
struct is_destructible
|
||||||
: public __destructible_imp<_Tp> {};
|
: public __destructible_imp<_Tp> {};
|
||||||
|
|
||||||
|
template <class _Tp>
|
||||||
|
struct is_destructible<_Tp[]>
|
||||||
|
: public false_type {};
|
||||||
|
|
||||||
// move
|
// move
|
||||||
|
|
||||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||||
|
@ -69,7 +69,9 @@ int main()
|
|||||||
test_is_destructible<const int*>();
|
test_is_destructible<const int*>();
|
||||||
test_is_destructible<char[3]>();
|
test_is_destructible<char[3]>();
|
||||||
test_is_destructible<bit_zero>();
|
test_is_destructible<bit_zero>();
|
||||||
|
test_is_destructible<int[3]>();
|
||||||
|
|
||||||
|
test_is_not_destructible<int[]>();
|
||||||
test_is_not_destructible<void>();
|
test_is_not_destructible<void>();
|
||||||
test_is_not_destructible<Abstract>();
|
test_is_not_destructible<Abstract>();
|
||||||
#if __has_feature(cxx_access_control_sfinae)
|
#if __has_feature(cxx_access_control_sfinae)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user