Skip to content

Commit 2c3b9b4

Browse files
committed
Use _CONSTEXPR20_CONTAINER
1 parent a3add31 commit 2c3b9b4

File tree

1 file changed

+38
-38
lines changed

1 file changed

+38
-38
lines changed

stl/inc/xmemory

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,15 +1016,15 @@ struct _Alloc_construct_ptr { // pointer used to help construct 1 _Alloc::value_
10161016
struct _Fake_allocator {};
10171017

10181018
struct _Container_base0 {
1019-
_CONSTEXPR20 void _Orphan_all() noexcept {}
1020-
_CONSTEXPR20 void _Swap_proxy_and_iterators(_Container_base0&) noexcept {}
1021-
_CONSTEXPR20 void _Alloc_proxy(const _Fake_allocator&) noexcept {}
1022-
_CONSTEXPR20 void _Reload_proxy(const _Fake_allocator&, const _Fake_allocator&) noexcept {}
1019+
_CONSTEXPR20_CONTAINER void _Orphan_all() noexcept {}
1020+
_CONSTEXPR20_CONTAINER void _Swap_proxy_and_iterators(_Container_base0&) noexcept {}
1021+
_CONSTEXPR20_CONTAINER void _Alloc_proxy(const _Fake_allocator&) noexcept {}
1022+
_CONSTEXPR20_CONTAINER void _Reload_proxy(const _Fake_allocator&, const _Fake_allocator&) noexcept {}
10231023
};
10241024

10251025
struct _Iterator_base0 {
1026-
_CONSTEXPR20 void _Adopt(const void*) noexcept {}
1027-
_CONSTEXPR20 const _Container_base0* _Getcont() const noexcept {
1026+
_CONSTEXPR20_CONTAINER void _Adopt(const void*) noexcept {}
1027+
_CONSTEXPR20_CONTAINER const _Container_base0* _Getcont() const noexcept {
10281028
return nullptr;
10291029
}
10301030

@@ -1034,33 +1034,33 @@ struct _Iterator_base0 {
10341034
// CLASS _Container_proxy
10351035
struct _Container_base12;
10361036
struct _Container_proxy { // store head of iterator chain and back pointer
1037-
_CONSTEXPR20 _Container_proxy() noexcept = default;
1038-
_CONSTEXPR20 _Container_proxy(_Container_base12* _Mycont_) noexcept : _Mycont(_Mycont_) {}
1037+
_CONSTEXPR20_CONTAINER _Container_proxy() noexcept = default;
1038+
_CONSTEXPR20_CONTAINER _Container_proxy(_Container_base12* _Mycont_) noexcept : _Mycont(_Mycont_) {}
10391039

10401040
const _Container_base12* _Mycont = nullptr;
10411041
mutable _Iterator_base12* _Myfirstiter = nullptr;
10421042
};
10431043

10441044
struct _Container_base12 {
10451045
public:
1046-
_CONSTEXPR20_DYNALLOC _Container_base12() noexcept = default;
1046+
_CONSTEXPR20_CONTAINER _Container_base12() noexcept = default;
10471047

10481048
_Container_base12(const _Container_base12&) = delete;
10491049
_Container_base12& operator=(const _Container_base12&) = delete;
10501050

1051-
_CONSTEXPR20_DYNALLOC void _Orphan_all() noexcept;
1052-
_CONSTEXPR20_DYNALLOC void _Swap_proxy_and_iterators(_Container_base12&) noexcept;
1051+
_CONSTEXPR20_CONTAINER void _Orphan_all() noexcept;
1052+
_CONSTEXPR20_CONTAINER void _Swap_proxy_and_iterators(_Container_base12&) noexcept;
10531053

10541054
template <class _Alloc>
1055-
_CONSTEXPR20_DYNALLOC void _Alloc_proxy(_Alloc&& _Al) {
1055+
_CONSTEXPR20_CONTAINER void _Alloc_proxy(_Alloc&& _Al) {
10561056
_Container_proxy* const _New_proxy = _Unfancy(_Al.allocate(1));
10571057
_Construct_in_place(*_New_proxy, this);
10581058
_Myproxy = _New_proxy;
10591059
_New_proxy->_Mycont = this;
10601060
}
10611061

10621062
template <class _Alloc>
1063-
_CONSTEXPR20_DYNALLOC void _Reload_proxy(_Alloc&& _Old_alloc, _Alloc&& _New_alloc) {
1063+
_CONSTEXPR20_CONTAINER void _Reload_proxy(_Alloc&& _Old_alloc, _Alloc&& _New_alloc) {
10641064
// pre: no iterators refer to the existing proxy
10651065
_Container_proxy* const _New_proxy = _Unfancy(_New_alloc.allocate(1));
10661066
_Construct_in_place(*_New_proxy, this);
@@ -1071,21 +1071,21 @@ public:
10711071
_Container_proxy* _Myproxy = nullptr;
10721072

10731073
private:
1074-
_CONSTEXPR20_DYNALLOC void _Orphan_all_unlocked() noexcept;
1074+
_CONSTEXPR20_CONTAINER void _Orphan_all_unlocked() noexcept;
10751075
inline void _Orphan_all_locked() noexcept;
1076-
_CONSTEXPR20_DYNALLOC void _Swap_proxy_and_iterators_unlocked(_Container_base12&) noexcept;
1076+
_CONSTEXPR20_CONTAINER void _Swap_proxy_and_iterators_unlocked(_Container_base12&) noexcept;
10771077
inline void _Swap_proxy_and_iterators_locked(_Container_base12&) noexcept;
10781078
};
10791079

10801080
struct _Iterator_base12 { // store links to container proxy, next iterator
10811081
public:
1082-
_CONSTEXPR20_DYNALLOC _Iterator_base12() noexcept = default; // construct orphaned iterator
1082+
_CONSTEXPR20_CONTAINER _Iterator_base12() noexcept = default; // construct orphaned iterator
10831083

1084-
_CONSTEXPR20_DYNALLOC _Iterator_base12(const _Iterator_base12& _Right) noexcept {
1084+
_CONSTEXPR20_CONTAINER _Iterator_base12(const _Iterator_base12& _Right) noexcept {
10851085
*this = _Right;
10861086
}
10871087

1088-
_CONSTEXPR20_DYNALLOC _Iterator_base12& operator=(const _Iterator_base12& _Right) noexcept {
1088+
_CONSTEXPR20_CONTAINER _Iterator_base12& operator=(const _Iterator_base12& _Right) noexcept {
10891089
if (_Myproxy != _Right._Myproxy) {
10901090
if (_Right._Myproxy) {
10911091
_Adopt(_Right._Myproxy->_Mycont);
@@ -1101,11 +1101,11 @@ public:
11011101
}
11021102

11031103
#if _ITERATOR_DEBUG_LEVEL == 2
1104-
_CONSTEXPR20_DYNALLOC ~_Iterator_base12() noexcept {
1104+
_CONSTEXPR20_CONTAINER ~_Iterator_base12() noexcept {
11051105
_Orphan_me();
11061106
}
11071107

1108-
_CONSTEXPR20_DYNALLOC void _Adopt(const _Container_base12* _Parent) noexcept {
1108+
_CONSTEXPR20_CONTAINER void _Adopt(const _Container_base12* _Parent) noexcept {
11091109
if (_Parent) { // have a parent, do adoption
11101110
_Container_proxy* _Parent_proxy = _Parent->_Myproxy;
11111111
if (_Myproxy != _Parent_proxy) { // change parentage
@@ -1123,7 +1123,7 @@ public:
11231123
}
11241124
}
11251125

1126-
_CONSTEXPR20_DYNALLOC void _Orphan_me() noexcept {
1126+
_CONSTEXPR20_CONTAINER void _Orphan_me() noexcept {
11271127
if (_Myproxy) { // adopted, remove self from list
11281128
#ifdef __cpp_lib_is_constant_evaluated
11291129
if (_STD is_constant_evaluated()) {
@@ -1137,7 +1137,7 @@ public:
11371137
}
11381138

11391139
#else // ^^^ _ITERATOR_DEBUG_LEVEL == 2 ^^^ / vvv _ITERATOR_DEBUG_LEVEL != 2 vvv
1140-
_CONSTEXPR20_DYNALLOC void _Adopt(const _Container_base12* _Parent) noexcept {
1140+
_CONSTEXPR20_CONTAINER void _Adopt(const _Container_base12* _Parent) noexcept {
11411141
if (_Parent) { // have a parent, do adoption
11421142
_Myproxy = _Parent->_Myproxy;
11431143
} else { // no future parent, just disown current parent
@@ -1146,7 +1146,7 @@ public:
11461146
}
11471147
#endif // _ITERATOR_DEBUG_LEVEL != 2
11481148

1149-
_CONSTEXPR20_DYNALLOC const _Container_base12* _Getcont() const noexcept {
1149+
_CONSTEXPR20_CONTAINER const _Container_base12* _Getcont() const noexcept {
11501150
return _Myproxy ? _Myproxy->_Mycont : nullptr;
11511151
}
11521152

@@ -1157,7 +1157,7 @@ public:
11571157

11581158
#if _ITERATOR_DEBUG_LEVEL == 2
11591159
private:
1160-
_CONSTEXPR20_DYNALLOC void _Adopt_unlocked(_Container_proxy* _Parent_proxy) noexcept {
1160+
_CONSTEXPR20_CONTAINER void _Adopt_unlocked(_Container_proxy* _Parent_proxy) noexcept {
11611161
if (_Myproxy) { // adopted, remove self from list
11621162
_Orphan_me_unlocked();
11631163
}
@@ -1171,7 +1171,7 @@ private:
11711171
_Adopt_unlocked(_Parent_proxy);
11721172
}
11731173

1174-
_CONSTEXPR20_DYNALLOC void _Orphan_me_unlocked() noexcept {
1174+
_CONSTEXPR20_CONTAINER void _Orphan_me_unlocked() noexcept {
11751175
_Iterator_base12** _Pnext = &_Myproxy->_Myfirstiter;
11761176
while (*_Pnext && *_Pnext != this) {
11771177
_Pnext = &(*_Pnext)->_Mynextiter;
@@ -1190,7 +1190,7 @@ private:
11901190
};
11911191

11921192
// MEMBER FUNCTIONS FOR _Container_base12
1193-
_CONSTEXPR20_DYNALLOC void _Container_base12::_Orphan_all_unlocked() noexcept {
1193+
_CONSTEXPR20_CONTAINER void _Container_base12::_Orphan_all_unlocked() noexcept {
11941194
for (auto _Pnext = &_Myproxy->_Myfirstiter; *_Pnext; *_Pnext = (*_Pnext)->_Mynextiter) {
11951195
(*_Pnext)->_Myproxy = nullptr;
11961196
}
@@ -1202,7 +1202,7 @@ inline void _Container_base12::_Orphan_all_locked() noexcept {
12021202
_Orphan_all_unlocked();
12031203
}
12041204

1205-
_CONSTEXPR20_DYNALLOC void _Container_base12::_Orphan_all() noexcept {
1205+
_CONSTEXPR20_CONTAINER void _Container_base12::_Orphan_all() noexcept {
12061206
#if _ITERATOR_DEBUG_LEVEL == 2
12071207
if (_Myproxy) { // proxy allocated, drain it
12081208
#ifdef __cpp_lib_is_constant_evaluated
@@ -1217,7 +1217,7 @@ _CONSTEXPR20_DYNALLOC void _Container_base12::_Orphan_all() noexcept {
12171217
#endif // _ITERATOR_DEBUG_LEVEL == 2
12181218
}
12191219

1220-
_CONSTEXPR20_DYNALLOC void _Container_base12::_Swap_proxy_and_iterators_unlocked(_Container_base12& _Right) noexcept {
1220+
_CONSTEXPR20_CONTAINER void _Container_base12::_Swap_proxy_and_iterators_unlocked(_Container_base12& _Right) noexcept {
12211221
_Container_proxy* _Temp = _Myproxy;
12221222
_Myproxy = _Right._Myproxy;
12231223
_Right._Myproxy = _Temp;
@@ -1236,7 +1236,7 @@ inline void _Container_base12::_Swap_proxy_and_iterators_locked(_Container_base1
12361236
_Swap_proxy_and_iterators_unlocked(_Right);
12371237
}
12381238

1239-
_CONSTEXPR20_DYNALLOC void _Container_base12::_Swap_proxy_and_iterators(_Container_base12& _Right) noexcept {
1239+
_CONSTEXPR20_CONTAINER void _Container_base12::_Swap_proxy_and_iterators(_Container_base12& _Right) noexcept {
12401240
#if _ITERATOR_DEBUG_LEVEL != 2
12411241
_Swap_proxy_and_iterators_unlocked(_Right);
12421242
#else // ^^^ _ITERATOR_DEBUG_LEVEL != 2 ^^^ / vvv _ITERATOR_DEBUG_LEVEL == 2 vvv
@@ -1267,11 +1267,11 @@ struct _Leave_proxy_unbound {
12671267
struct _Fake_proxy_ptr_impl { // fake replacement for a container proxy smart pointer when no container proxy is in use
12681268
_Fake_proxy_ptr_impl(const _Fake_proxy_ptr_impl&) = delete;
12691269
_Fake_proxy_ptr_impl& operator=(const _Fake_proxy_ptr_impl&) = delete;
1270-
_CONSTEXPR20_DYNALLOC _Fake_proxy_ptr_impl(const _Fake_allocator&, _Leave_proxy_unbound) noexcept {}
1271-
_CONSTEXPR20_DYNALLOC _Fake_proxy_ptr_impl(const _Fake_allocator&, const _Container_base0&) noexcept {}
1270+
_CONSTEXPR20_CONTAINER _Fake_proxy_ptr_impl(const _Fake_allocator&, _Leave_proxy_unbound) noexcept {}
1271+
_CONSTEXPR20_CONTAINER _Fake_proxy_ptr_impl(const _Fake_allocator&, const _Container_base0&) noexcept {}
12721272

1273-
_CONSTEXPR20_DYNALLOC void _Bind(const _Fake_allocator&, _Container_base0*) noexcept {}
1274-
_CONSTEXPR20_DYNALLOC void _Release() noexcept {}
1273+
_CONSTEXPR20_CONTAINER void _Bind(const _Fake_allocator&, _Container_base0*) noexcept {}
1274+
_CONSTEXPR20_CONTAINER void _Release() noexcept {}
12751275
};
12761276

12771277
struct _Basic_container_proxy_ptr12 {
@@ -1283,7 +1283,7 @@ struct _Basic_container_proxy_ptr12 {
12831283
}
12841284

12851285
protected:
1286-
_CONSTEXPR20_DYNALLOC _Basic_container_proxy_ptr12() = default;
1286+
_CONSTEXPR20_CONTAINER _Basic_container_proxy_ptr12() = default;
12871287
_Basic_container_proxy_ptr12(const _Basic_container_proxy_ptr12&) = delete;
12881288
_Basic_container_proxy_ptr12(_Basic_container_proxy_ptr12&&) = delete;
12891289
};
@@ -1293,27 +1293,27 @@ struct _Container_proxy_ptr12 : _Basic_container_proxy_ptr12 {
12931293
// smart pointer components for a _Container_proxy * for an allocator family
12941294
_Alloc& _Al;
12951295

1296-
_CONSTEXPR20_DYNALLOC _Container_proxy_ptr12(_Alloc& _Al_, _Leave_proxy_unbound) : _Al(_Al_) {
1296+
_CONSTEXPR20_CONTAINER _Container_proxy_ptr12(_Alloc& _Al_, _Leave_proxy_unbound) : _Al(_Al_) {
12971297
// create a new unbound _Container_proxy
12981298
_Ptr = _Unfancy(_Al_.allocate(1));
12991299
_Construct_in_place(*_Ptr);
13001300
}
13011301

1302-
_CONSTEXPR20_DYNALLOC _Container_proxy_ptr12(_Alloc& _Al_, _Container_base12& _Mycont) : _Al(_Al_) {
1302+
_CONSTEXPR20_CONTAINER _Container_proxy_ptr12(_Alloc& _Al_, _Container_base12& _Mycont) : _Al(_Al_) {
13031303
// create a new _Container_proxy pointing at _Mycont
13041304
_Ptr = _Unfancy(_Al_.allocate(1));
13051305
_Construct_in_place(*_Ptr, _STD addressof(_Mycont));
13061306
_Mycont._Myproxy = _Ptr;
13071307
}
13081308

1309-
_CONSTEXPR20_DYNALLOC void _Bind(_Alloc& _Old_alloc, _Container_base12* _Mycont) noexcept {
1309+
_CONSTEXPR20_CONTAINER void _Bind(_Alloc& _Old_alloc, _Container_base12* _Mycont) noexcept {
13101310
// Attach the proxy stored in *this to _Mycont, and destroy _Mycont's existing proxy
13111311
// with _Old_alloc. Requires that no iterators are alive referring to _Mycont.
13121312
_Ptr->_Mycont = _Mycont;
13131313
_Delete_plain_internal(_Old_alloc, _STD exchange(_Mycont->_Myproxy, _STD exchange(_Ptr, nullptr)));
13141314
}
13151315

1316-
_CONSTEXPR20_DYNALLOC ~_Container_proxy_ptr12() {
1316+
_CONSTEXPR20_CONTAINER ~_Container_proxy_ptr12() {
13171317
if (_Ptr) {
13181318
_Delete_plain_internal(_Al, _Ptr);
13191319
}

0 commit comments

Comments
 (0)