[libcxx-commits] [libcxx] d7d7060 - Eliminate _LIBCPP_EQUAL_DELETE in favor of `=delete`.
Arthur O'Dwyer via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Sep 20 10:27:08 PDT 2021
Author: Arthur O'Dwyer
Date: 2021-09-20T13:26:59-04:00
New Revision: d7d7060127b7db8c4cb05edab2d5c0f18ec0d66b
URL: https://github.com/llvm/llvm-project/commit/d7d7060127b7db8c4cb05edab2d5c0f18ec0d66b
DIFF: https://github.com/llvm/llvm-project/commit/d7d7060127b7db8c4cb05edab2d5c0f18ec0d66b.diff
LOG: Eliminate _LIBCPP_EQUAL_DELETE in favor of `=delete`.
All supported compilers have supported `=delete` as an extension
in C++03 mode for many years at this point.
Differential Revision: https://reviews.llvm.org/D109942
Added:
Modified:
libcxx/include/__config
libcxx/include/__mutex_base
libcxx/include/__tree
libcxx/include/map
Removed:
################################################################################
diff --git a/libcxx/include/__config b/libcxx/include/__config
index b59214331e866..f959c6b1f383d 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -831,12 +831,6 @@ typedef unsigned int char32_t;
# define _LIBCPP_DEFAULT = default;
#endif
-#ifdef _LIBCPP_CXX03_LANG
-# define _LIBCPP_EQUAL_DELETE
-#else
-# define _LIBCPP_EQUAL_DELETE = delete
-#endif
-
#ifdef __GNUC__
# define _LIBCPP_NOALIAS __attribute__((__malloc__))
#else
diff --git a/libcxx/include/__mutex_base b/libcxx/include/__mutex_base
index 77590a8fd4f1d..936633e0dd7be 100644
--- a/libcxx/include/__mutex_base
+++ b/libcxx/include/__mutex_base
@@ -96,8 +96,8 @@ public:
~lock_guard() _LIBCPP_THREAD_SAFETY_ANNOTATION(release_capability()) {__m_.unlock();}
private:
- lock_guard(lock_guard const&) _LIBCPP_EQUAL_DELETE;
- lock_guard& operator=(lock_guard const&) _LIBCPP_EQUAL_DELETE;
+ lock_guard(lock_guard const&) = delete;
+ lock_guard& operator=(lock_guard const&) = delete;
};
template <class _Mutex>
diff --git a/libcxx/include/__tree b/libcxx/include/__tree
index 6113322ed99df..57ac275b0d8a8 100644
--- a/libcxx/include/__tree
+++ b/libcxx/include/__tree
@@ -738,9 +738,9 @@ public:
}
private:
- ~__tree_node_base() _LIBCPP_EQUAL_DELETE;
- __tree_node_base(__tree_node_base const&) _LIBCPP_EQUAL_DELETE;
- __tree_node_base& operator=(__tree_node_base const&) _LIBCPP_EQUAL_DELETE;
+ ~__tree_node_base() = delete;
+ __tree_node_base(__tree_node_base const&) = delete;
+ __tree_node_base& operator=(__tree_node_base const&) = delete;
};
template <class _Tp, class _VoidPtr>
@@ -753,9 +753,9 @@ public:
__node_value_type __value_;
private:
- ~__tree_node() _LIBCPP_EQUAL_DELETE;
- __tree_node(__tree_node const&) _LIBCPP_EQUAL_DELETE;
- __tree_node& operator=(__tree_node const&) _LIBCPP_EQUAL_DELETE;
+ ~__tree_node() = delete;
+ __tree_node(__tree_node const&) = delete;
+ __tree_node& operator=(__tree_node const&) = delete;
};
diff --git a/libcxx/include/map b/libcxx/include/map
index 5ebf67b5f9fa4..3cca20511fd20 100644
--- a/libcxx/include/map
+++ b/libcxx/include/map
@@ -747,10 +747,10 @@ public:
}
private:
- __value_type() _LIBCPP_EQUAL_DELETE;
- ~__value_type() _LIBCPP_EQUAL_DELETE;
- __value_type(const __value_type& __v) _LIBCPP_EQUAL_DELETE;
- __value_type(__value_type&& __v) _LIBCPP_EQUAL_DELETE;
+ __value_type() = delete;
+ ~__value_type() = delete;
+ __value_type(const __value_type&) = delete;
+ __value_type(__value_type&&) = delete;
};
#else
More information about the libcxx-commits
mailing list