[libcxx-commits] [libcxx] 8d7d7f3 - [libc++] NFC: Refactor raw_storage_iterator test to use UNSUPPORTED markup
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu May 27 11:21:51 PDT 2021
Author: Louis Dionne
Date: 2021-05-27T14:23:32-04:00
New Revision: 8d7d7f340ea0202cedddc786b484048da4bbc767
URL: https://github.com/llvm/llvm-project/commit/8d7d7f340ea0202cedddc786b484048da4bbc767
DIFF: https://github.com/llvm/llvm-project/commit/8d7d7f340ea0202cedddc786b484048da4bbc767.diff
LOG: [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.
Added:
Modified:
libcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.base.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.base.pass.cpp b/libcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.base.pass.cpp
index 996c98082496..8d7c9d5a4309 100644
--- a/libcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.base.pass.cpp
+++ b/libcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.base.pass.cpp
@@ -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 @@ struct A
~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;
}
More information about the libcxx-commits
mailing list