[libcxx-commits] [libcxx] 4955095 - [libc++] Remove _LIBCPP_DEFAULT
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Dec 7 13:19:32 PST 2021
Author: Nikolas Klauser
Date: 2021-12-07T22:18:38+01:00
New Revision: 4955095fe69fa7724c8de8bda8ec8d1f76277e29
URL: https://github.com/llvm/llvm-project/commit/4955095fe69fa7724c8de8bda8ec8d1f76277e29
DIFF: https://github.com/llvm/llvm-project/commit/4955095fe69fa7724c8de8bda8ec8d1f76277e29.diff
LOG: [libc++] Remove _LIBCPP_DEFAULT
clang has `= default` as an extension in c++03, so just use it.
Reviewed By: ldionne, Quuxplusone, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D115275
Added:
Modified:
libcxx/include/__config
libcxx/include/__memory/allocator.h
libcxx/include/atomic
libcxx/include/system_error
Removed:
################################################################################
diff --git a/libcxx/include/__config b/libcxx/include/__config
index da03e877f753e..84ce728ac3a00 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -837,12 +837,6 @@ typedef unsigned int char32_t;
#define _LIBCPP_HAS_NO_RANGES
#endif
-#ifdef _LIBCPP_CXX03_LANG
-# define _LIBCPP_DEFAULT {}
-#else
-# define _LIBCPP_DEFAULT = default;
-#endif
-
#ifdef __GNUC__
# define _LIBCPP_NOALIAS __attribute__((__malloc__))
#else
diff --git a/libcxx/include/__memory/allocator.h b/libcxx/include/__memory/allocator.h
index 283212fb703dd..708bd82b02d2b 100644
--- a/libcxx/include/__memory/allocator.h
+++ b/libcxx/include/__memory/allocator.h
@@ -89,7 +89,7 @@ class _LIBCPP_TEMPLATE_VIS allocator
typedef true_type is_always_equal;
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
- allocator() _NOEXCEPT _LIBCPP_DEFAULT
+ allocator() _NOEXCEPT = default;
template <class _Up>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
@@ -171,7 +171,7 @@ class _LIBCPP_TEMPLATE_VIS allocator<const _Tp>
typedef true_type is_always_equal;
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
- allocator() _NOEXCEPT _LIBCPP_DEFAULT
+ allocator() _NOEXCEPT = default;
template <class _Up>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
diff --git a/libcxx/include/atomic b/libcxx/include/atomic
index cfd0e1d054a88..4b4c347a57046 100644
--- a/libcxx/include/atomic
+++ b/libcxx/include/atomic
@@ -1443,7 +1443,7 @@ struct __cxx_atomic_impl : public _Base {
static_assert(is_trivially_copyable<_Tp>::value,
"std::atomic<T> requires that 'T' be a trivially copyable type");
- _LIBCPP_INLINE_VISIBILITY __cxx_atomic_impl() _NOEXCEPT _LIBCPP_DEFAULT
+ _LIBCPP_INLINE_VISIBILITY __cxx_atomic_impl() _NOEXCEPT = default;
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR explicit __cxx_atomic_impl(_Tp value) _NOEXCEPT
: _Base(value) {}
};
@@ -1644,7 +1644,7 @@ struct __atomic_base // false
__atomic_base() noexcept(is_nothrow_default_constructible_v<_Tp>) : __a_(_Tp()) {}
#else
_LIBCPP_INLINE_VISIBILITY
- __atomic_base() _NOEXCEPT _LIBCPP_DEFAULT
+ __atomic_base() _NOEXCEPT = default;
#endif
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
@@ -1673,7 +1673,7 @@ struct __atomic_base<_Tp, true>
typedef __atomic_base<_Tp, false> __base;
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
- __atomic_base() _NOEXCEPT _LIBCPP_DEFAULT
+ __atomic_base() _NOEXCEPT = default;
_LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR __atomic_base(_Tp __d) _NOEXCEPT : __base(__d) {}
@@ -1762,7 +1762,7 @@ struct atomic
atomic() = default;
#else
_LIBCPP_INLINE_VISIBILITY
- atomic() _NOEXCEPT _LIBCPP_DEFAULT
+ atomic() _NOEXCEPT = default;
#endif
_LIBCPP_INLINE_VISIBILITY
@@ -1790,7 +1790,7 @@ struct atomic<_Tp*>
typedef ptr
diff _t
diff erence_type;
_LIBCPP_INLINE_VISIBILITY
- atomic() _NOEXCEPT _LIBCPP_DEFAULT
+ atomic() _NOEXCEPT = default;
_LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR atomic(_Tp* __d) _NOEXCEPT : __base(__d) {}
@@ -2432,7 +2432,7 @@ typedef struct atomic_flag
atomic_flag() _NOEXCEPT : __a_(false) {}
#else
_LIBCPP_INLINE_VISIBILITY
- atomic_flag() _NOEXCEPT _LIBCPP_DEFAULT
+ atomic_flag() _NOEXCEPT = default;
#endif
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
diff --git a/libcxx/include/system_error b/libcxx/include/system_error
index 3aa869acff417..0bd2d2363882c 100644
--- a/libcxx/include/system_error
+++ b/libcxx/include/system_error
@@ -206,7 +206,7 @@ public:
error_category() _NOEXCEPT;
#else
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX11 error_category() _NOEXCEPT _LIBCPP_DEFAULT
+ _LIBCPP_CONSTEXPR_AFTER_CXX11 error_category() _NOEXCEPT = default;
#endif
private:
error_category(const error_category&);// = delete;
More information about the libcxx-commits
mailing list