[libc++] NFC: Refactor raw_storage_iterator test to use UNSUPPORTED markup
authorLouis Dionne <ldionne.2@gmail.com>
Thu, 27 May 2021 18:22:38 +0000 (14:22 -0400)
committerLouis Dionne <ldionne.2@gmail.com>
Thu, 27 May 2021 18:23:32 +0000 (14:23 -0400)
The test would previously disable itself using `#if TEST_STD_VER` instead
of using UNSUPPORTED markup.

libcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.base.pass.cpp

index 996c980..8d7c9d5 100644 (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
 
 
 #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;
 }