[libcxx-commits] [PATCH] D109942: Eliminate _LIBCPP_EQUAL_DELETE in favor of `=delete`. NFC.
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Sep 16 19:50:21 PDT 2021
Quuxplusone created this revision.
Quuxplusone added reviewers: ldionne, libc++, Mordante.
Quuxplusone added a project: libc++.
Quuxplusone requested review of this revision.
Herald added a subscriber: libcxx-commits.
Herald added 1 blocking reviewer(s): libc++.
All supported compilers have supported `=delete` as an extension in C++03 mode for many years at this point.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D109942
Files:
libcxx/include/__config
libcxx/include/__mutex_base
libcxx/include/__tree
libcxx/include/map
Index: libcxx/include/map
===================================================================
--- libcxx/include/map
+++ libcxx/include/map
@@ -747,10 +747,10 @@
}
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
Index: libcxx/include/__tree
===================================================================
--- libcxx/include/__tree
+++ libcxx/include/__tree
@@ -738,9 +738,9 @@
}
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 @@
__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;
};
Index: libcxx/include/__mutex_base
===================================================================
--- libcxx/include/__mutex_base
+++ libcxx/include/__mutex_base
@@ -96,8 +96,8 @@
~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>
Index: libcxx/include/__config
===================================================================
--- libcxx/include/__config
+++ libcxx/include/__config
@@ -831,12 +831,6 @@
# 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109942.373124.patch
Type: text/x-patch
Size: 2466 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210917/31e64e00/attachment.bin>
More information about the libcxx-commits
mailing list