Skip to content

Commit 4955095

Browse files
committed
[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
1 parent 6914af0 commit 4955095

File tree

4 files changed

+9
-15
lines changed

4 files changed

+9
-15
lines changed

libcxx/include/__config

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -837,12 +837,6 @@ typedef unsigned int char32_t;
837837
#define _LIBCPP_HAS_NO_RANGES
838838
#endif
839839

840-
#ifdef _LIBCPP_CXX03_LANG
841-
# define _LIBCPP_DEFAULT {}
842-
#else
843-
# define _LIBCPP_DEFAULT = default;
844-
#endif
845-
846840
#ifdef __GNUC__
847841
# define _LIBCPP_NOALIAS __attribute__((__malloc__))
848842
#else

libcxx/include/__memory/allocator.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class _LIBCPP_TEMPLATE_VIS allocator
8989
typedef true_type is_always_equal;
9090

9191
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
92-
allocator() _NOEXCEPT _LIBCPP_DEFAULT
92+
allocator() _NOEXCEPT = default;
9393

9494
template <class _Up>
9595
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
@@ -171,7 +171,7 @@ class _LIBCPP_TEMPLATE_VIS allocator<const _Tp>
171171
typedef true_type is_always_equal;
172172

173173
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
174-
allocator() _NOEXCEPT _LIBCPP_DEFAULT
174+
allocator() _NOEXCEPT = default;
175175

176176
template <class _Up>
177177
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17

libcxx/include/atomic

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,7 +1443,7 @@ struct __cxx_atomic_impl : public _Base {
14431443
static_assert(is_trivially_copyable<_Tp>::value,
14441444
"std::atomic<T> requires that 'T' be a trivially copyable type");
14451445

1446-
_LIBCPP_INLINE_VISIBILITY __cxx_atomic_impl() _NOEXCEPT _LIBCPP_DEFAULT
1446+
_LIBCPP_INLINE_VISIBILITY __cxx_atomic_impl() _NOEXCEPT = default;
14471447
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR explicit __cxx_atomic_impl(_Tp value) _NOEXCEPT
14481448
: _Base(value) {}
14491449
};
@@ -1644,7 +1644,7 @@ struct __atomic_base // false
16441644
__atomic_base() noexcept(is_nothrow_default_constructible_v<_Tp>) : __a_(_Tp()) {}
16451645
#else
16461646
_LIBCPP_INLINE_VISIBILITY
1647-
__atomic_base() _NOEXCEPT _LIBCPP_DEFAULT
1647+
__atomic_base() _NOEXCEPT = default;
16481648
#endif
16491649

16501650
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
@@ -1673,7 +1673,7 @@ struct __atomic_base<_Tp, true>
16731673
typedef __atomic_base<_Tp, false> __base;
16741674

16751675
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
1676-
__atomic_base() _NOEXCEPT _LIBCPP_DEFAULT
1676+
__atomic_base() _NOEXCEPT = default;
16771677

16781678
_LIBCPP_INLINE_VISIBILITY
16791679
_LIBCPP_CONSTEXPR __atomic_base(_Tp __d) _NOEXCEPT : __base(__d) {}
@@ -1762,7 +1762,7 @@ struct atomic
17621762
atomic() = default;
17631763
#else
17641764
_LIBCPP_INLINE_VISIBILITY
1765-
atomic() _NOEXCEPT _LIBCPP_DEFAULT
1765+
atomic() _NOEXCEPT = default;
17661766
#endif
17671767

17681768
_LIBCPP_INLINE_VISIBILITY
@@ -1790,7 +1790,7 @@ struct atomic<_Tp*>
17901790
typedef ptrdiff_t difference_type;
17911791

17921792
_LIBCPP_INLINE_VISIBILITY
1793-
atomic() _NOEXCEPT _LIBCPP_DEFAULT
1793+
atomic() _NOEXCEPT = default;
17941794

17951795
_LIBCPP_INLINE_VISIBILITY
17961796
_LIBCPP_CONSTEXPR atomic(_Tp* __d) _NOEXCEPT : __base(__d) {}
@@ -2432,7 +2432,7 @@ typedef struct atomic_flag
24322432
atomic_flag() _NOEXCEPT : __a_(false) {}
24332433
#else
24342434
_LIBCPP_INLINE_VISIBILITY
2435-
atomic_flag() _NOEXCEPT _LIBCPP_DEFAULT
2435+
atomic_flag() _NOEXCEPT = default;
24362436
#endif
24372437

24382438
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR

libcxx/include/system_error

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ public:
206206
error_category() _NOEXCEPT;
207207
#else
208208
_LIBCPP_INLINE_VISIBILITY
209-
_LIBCPP_CONSTEXPR_AFTER_CXX11 error_category() _NOEXCEPT _LIBCPP_DEFAULT
209+
_LIBCPP_CONSTEXPR_AFTER_CXX11 error_category() _NOEXCEPT = default;
210210
#endif
211211
private:
212212
error_category(const error_category&);// = delete;

0 commit comments

Comments
 (0)