Fix __is_referenceable to work with vector types. Fixes PR#26654 and 26656. Thanks to Evgeniy for the reports, and to Eric for the suggestion on how to fix it.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@261581 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2016-02-22 22:13:03 +00:00
parent 66e344fa9b
commit d812865ec0
2 changed files with 12 additions and 26 deletions

View File

@@ -39,6 +39,11 @@ static_assert(( std::__is_referenceable<Foo &&>::value), "");
static_assert(( std::__is_referenceable<const Foo &&>::value), "");
#endif
static_assert(( std::__is_referenceable<int __attribute__((__vector_size__( 8)))>::value), "");
static_assert(( std::__is_referenceable<const int __attribute__((__vector_size__( 8)))>::value), "");
static_assert(( std::__is_referenceable<float __attribute__((__vector_size__(16)))>::value), "");
static_assert(( std::__is_referenceable<const float __attribute__((__vector_size__(16)))>::value), "");
// Functions without cv-qualifiers are referenceable
static_assert(( std::__is_referenceable<void ()>::value), "");
#if TEST_STD_VER >= 11