Skip to content

Commit 318507e

Browse files
committed
[libc++] Remove a few unneeded _LIBCPP_CXX03_LANG ifdefs
Reviewed By: Quuxplusone, ldionne, #libc Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D119896
1 parent 826fae5 commit 318507e

File tree

4 files changed

+5
-44
lines changed

4 files changed

+5
-44
lines changed

libcxx/include/__debug

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,9 @@ struct _LIBCPP_TYPE_VIS __i_node
4545
__i_node* __next_;
4646
__c_node* __c_;
4747

48-
#ifndef _LIBCPP_CXX03_LANG
4948
__i_node(const __i_node&) = delete;
5049
__i_node& operator=(const __i_node&) = delete;
51-
#else
52-
private:
53-
__i_node(const __i_node&);
54-
__i_node& operator=(const __i_node&);
55-
public:
56-
#endif
50+
5751
_LIBCPP_INLINE_VISIBILITY
5852
__i_node(void* __i, __i_node* __next, __c_node* __c)
5953
: __i_(__i), __next_(__next), __c_(__c) {}
@@ -68,15 +62,9 @@ struct _LIBCPP_TYPE_VIS __c_node
6862
__i_node** end_;
6963
__i_node** cap_;
7064

71-
#ifndef _LIBCPP_CXX03_LANG
7265
__c_node(const __c_node&) = delete;
7366
__c_node& operator=(const __c_node&) = delete;
74-
#else
75-
private:
76-
__c_node(const __c_node&);
77-
__c_node& operator=(const __c_node&);
78-
public:
79-
#endif
67+
8068
_LIBCPP_INLINE_VISIBILITY
8169
__c_node(void* __c, __c_node* __next)
8270
: __c_(__c), __next_(__next), beg_(nullptr), end_(nullptr), cap_(nullptr) {}
@@ -155,15 +143,9 @@ class _LIBCPP_TYPE_VIS __libcpp_db
155143

156144
__libcpp_db();
157145
public:
158-
#ifndef _LIBCPP_CXX03_LANG
159146
__libcpp_db(const __libcpp_db&) = delete;
160147
__libcpp_db& operator=(const __libcpp_db&) = delete;
161-
#else
162-
private:
163-
__libcpp_db(const __libcpp_db&);
164-
__libcpp_db& operator=(const __libcpp_db&);
165-
public:
166-
#endif
148+
167149
~__libcpp_db();
168150

169151
class __db_c_iterator;

libcxx/include/__iterator/reverse_access.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121

2222
_LIBCPP_BEGIN_NAMESPACE_STD
2323

24-
#if !defined(_LIBCPP_CXX03_LANG)
25-
2624
#if _LIBCPP_STD_VER > 11
2725

2826
template <class _Tp, size_t _Np>
@@ -95,9 +93,7 @@ auto crend(const _Cp& __c) -> decltype(_VSTD::rend(__c))
9593
return _VSTD::rend(__c);
9694
}
9795

98-
#endif
99-
100-
#endif // !defined(_LIBCPP_CXX03_LANG)
96+
#endif // _LIBCPP_STD_VER > 11
10197

10298
_LIBCPP_END_NAMESPACE_STD
10399

libcxx/include/__memory/unique_ptr.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,6 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr {
263263
unique_ptr& operator=(unique_ptr const&) = delete;
264264
#endif
265265

266-
267266
_LIBCPP_INLINE_VISIBILITY
268267
~unique_ptr() { reset(); }
269268

@@ -485,7 +484,6 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr<_Tp[], _Dp>
485484
unique_ptr(unique_ptr const&) = delete;
486485
unique_ptr& operator=(unique_ptr const&) = delete;
487486
#endif
488-
489487
public:
490488
_LIBCPP_INLINE_VISIBILITY
491489
~unique_ptr() { reset(); }

libcxx/include/atomic

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1651,13 +1651,7 @@ struct __atomic_base // false
16511651
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
16521652
__atomic_base(_Tp __d) _NOEXCEPT : __a_(__d) {}
16531653

1654-
#ifndef _LIBCPP_CXX03_LANG
16551654
__atomic_base(const __atomic_base&) = delete;
1656-
#else
1657-
private:
1658-
_LIBCPP_INLINE_VISIBILITY
1659-
__atomic_base(const __atomic_base&);
1660-
#endif
16611655
};
16621656

16631657
#if defined(__cpp_lib_atomic_is_always_lock_free)
@@ -2439,19 +2433,10 @@ typedef struct atomic_flag
24392433
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
24402434
atomic_flag(bool __b) _NOEXCEPT : __a_(__b) {} // EXTENSION
24412435

2442-
#ifndef _LIBCPP_CXX03_LANG
24432436
atomic_flag(const atomic_flag&) = delete;
24442437
atomic_flag& operator=(const atomic_flag&) = delete;
24452438
atomic_flag& operator=(const atomic_flag&) volatile = delete;
2446-
#else
2447-
private:
2448-
_LIBCPP_INLINE_VISIBILITY
2449-
atomic_flag(const atomic_flag&);
2450-
_LIBCPP_INLINE_VISIBILITY
2451-
atomic_flag& operator=(const atomic_flag&);
2452-
_LIBCPP_INLINE_VISIBILITY
2453-
atomic_flag& operator=(const atomic_flag&) volatile;
2454-
#endif
2439+
24552440
} atomic_flag;
24562441

24572442

0 commit comments

Comments
 (0)