[libc++] NFC: Refactor raw_storage_iterator test to use UNSUPPORTED markup

The test would previously disable itself using `#if TEST_STD_VER` instead
of using UNSUPPORTED markup.
This commit is contained in:
Louis Dionne 2021-05-27 14:22:38 -04:00
parent c261edb277
commit 8d7d7f340e
1 changed files with 3 additions and 11 deletions

View File

@ -6,6 +6,7 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_RAW_STORAGE_ITERATOR
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
@ -17,13 +18,6 @@
#include "test_macros.h"
#if TEST_STD_VER >= 11
#define DELETE_FUNCTION = delete
#else
#define DELETE_FUNCTION
#endif
int A_constructed = 0;
struct A
@ -36,12 +30,11 @@ public:
~A() {--A_constructed; data_ = 0;}
bool operator==(int i) const {return data_ == i;}
A* operator& () DELETE_FUNCTION;
A* operator& () = delete;
};
int main(int, char**)
{
#if TEST_STD_VER >= 14
typedef std::aligned_storage<3*sizeof(A), std::alignment_of<A>::value>::type
Storage;
Storage buffer;
@ -56,7 +49,6 @@ int main(int, char**)
assert(A_constructed == i+1);
assert(it.base() == ap + 1); // next place to write
}
#endif
return 0;
return 0;
}