diff --git a/libcxx/test/libcxx/iterators/contiguous_iterators.pass.cpp b/libcxx/test/libcxx/iterators/contiguous_iterators.pass.cpp --- a/libcxx/test/libcxx/iterators/contiguous_iterators.pass.cpp +++ b/libcxx/test/libcxx/iterators/contiguous_iterators.pass.cpp @@ -35,12 +35,6 @@ #include #endif -#if TEST_STD_VER >= 11 -#define DELETE_FUNCTION = delete -#else -#define DELETE_FUNCTION -#endif - class T; // incomplete class my_input_iterator diff --git a/libcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.pass.cpp b/libcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.pass.cpp --- a/libcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.pass.cpp +++ b/libcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.pass.cpp @@ -18,12 +18,6 @@ #include "test_macros.h" #include -#if TEST_STD_VER >= 11 -#define DELETE_FUNCTION = delete -#else -#define DELETE_FUNCTION -#endif - int A_constructed = 0; struct A diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared.pass.cpp --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared.pass.cpp @@ -21,12 +21,6 @@ #include "test_allocator.h" #include "min_allocator.h" -#if TEST_STD_VER >= 11 -#define DELETE_FUNCTION = delete -#else -#define DELETE_FUNCTION -#endif - int new_count = 0; struct A diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp @@ -18,12 +18,6 @@ #include "test_macros.h" #include "count_new.h" -#if TEST_STD_VER >= 11 -#define DELETE_FUNCTION = delete -#else -#define DELETE_FUNCTION -#endif - struct A { static int count; diff --git a/libcxx/test/support/test_allocator.h b/libcxx/test/support/test_allocator.h --- a/libcxx/test/support/test_allocator.h +++ b/libcxx/test/support/test_allocator.h @@ -419,10 +419,8 @@ explicit limited_allocator(limited_allocator const& other) : handle_(other.handle_) {} -private: - limited_allocator& operator=(const limited_allocator&);// = delete; + limited_allocator& operator=(const limited_allocator&) DELETE_FUNCTION; -public: pointer allocate(size_type n) { return handle_->template allocate(n); } void deallocate(pointer p, size_type n) { handle_->deallocate(p, n); } size_type max_size() const {return N;} diff --git a/libcxx/test/support/test_iterators.h b/libcxx/test/support/test_iterators.h --- a/libcxx/test/support/test_iterators.h +++ b/libcxx/test/support/test_iterators.h @@ -16,12 +16,6 @@ #include "test_macros.h" -#if TEST_STD_VER >= 11 -#define DELETE_FUNCTION = delete -#else -#define DELETE_FUNCTION -#endif - template class output_iterator { @@ -944,6 +938,4 @@ #endif // TEST_STD_VER > 17 && defined(__cpp_lib_concepts) -#undef DELETE_FUNCTION - #endif // SUPPORT_TEST_ITERATORS_H diff --git a/libcxx/test/support/test_macros.h b/libcxx/test/support/test_macros.h --- a/libcxx/test/support/test_macros.h +++ b/libcxx/test/support/test_macros.h @@ -241,6 +241,12 @@ #define TEST_IGNORE_NODISCARD (void) +#if TEST_STD_VER >= 11 +#define DELETE_FUNCTION = delete +#else +#define DELETE_FUNCTION +#endif + namespace test_macros_detail { template struct is_same { enum { value = 0};} ;