Skip to content

Commit 3d213b1

Browse files
committed
Address reviewers comments
1 parent 838c50f commit 3d213b1

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

libcxx/include/__memory/allocation_guard.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,16 @@ struct __allocation_guard {
5757

5858
_LIBCPP_CONSTEXPR_SINCE_CXX26 _LIBCPP_HIDE_FROM_ABI ~__allocation_guard() _NOEXCEPT { __destroy(); }
5959

60-
_LIBCPP_CONSTEXPR_SINCE_CXX26 _LIBCPP_HIDE_FROM_ABI __allocation_guard(const __allocation_guard&) = delete;
60+
__allocation_guard(const __allocation_guard&) = delete;
61+
__allocation_guard& operator=(const __allocation_guard& __other) = delete;
62+
6163
_LIBCPP_CONSTEXPR_SINCE_CXX26 _LIBCPP_HIDE_FROM_ABI __allocation_guard(__allocation_guard&& __other) _NOEXCEPT
6264
: __alloc_(std::move(__other.__alloc_)),
6365
__n_(__other.__n_),
6466
__ptr_(__other.__ptr_) {
6567
__other.__ptr_ = nullptr;
6668
}
6769

68-
_LIBCPP_CONSTEXPR_SINCE_CXX26 _LIBCPP_HIDE_FROM_ABI __allocation_guard&
69-
operator=(const __allocation_guard& __other) = delete;
7070
_LIBCPP_CONSTEXPR_SINCE_CXX26 _LIBCPP_HIDE_FROM_ABI __allocation_guard&
7171
operator=(__allocation_guard&& __other) _NOEXCEPT {
7272
if (std::addressof(__other) != this) {

libcxx/include/forward_list

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -343,9 +343,7 @@ private:
343343
_ALIGNAS_TYPE(_Tp) char __buffer_[sizeof(_Tp)];
344344

345345
public:
346-
_LIBCPP_CONSTEXPR_SINCE_CXX26 _LIBCPP_HIDE_FROM_ABI _Tp& __get_value() {
347-
return *std::__launder(reinterpret_cast<_Tp*>(&__buffer_));
348-
}
346+
_LIBCPP_HIDE_FROM_ABI _Tp& __get_value() { return *std::__launder(reinterpret_cast<_Tp*>(&__buffer_)); }
349347
# endif
350348

351349
_LIBCPP_CONSTEXPR_SINCE_CXX26 _LIBCPP_HIDE_FROM_ABI explicit __forward_list_node(_NodePtr __next) : _Base(__next) {}
@@ -1218,7 +1216,6 @@ forward_list<_Tp, _Alloc>::__insert_after(const_iterator __p, size_type __n, _Ar
12181216
__last->__next_ = __r->__next_;
12191217
__r->__next_ = __first;
12201218
__r = __forward_node_traits<__node_pointer>::__as_iter_node(__last);
1221-
// __r = static_cast<__begin_node_pointer>(__last);
12221219
}
12231220
return iterator(__r);
12241221
}
@@ -1260,7 +1257,6 @@ forward_list<_Tp, _Alloc>::__insert_after_with_sentinel(const_iterator __p, _Inp
12601257
__last->__next_ = __r->__next_;
12611258
__r->__next_ = __first;
12621259
__r = __forward_node_traits<__node_pointer>::__as_iter_node(__last);
1263-
// __r = static_cast<__begin_node_pointer>(__last);
12641260
}
12651261

12661262
return iterator(__r);

0 commit comments

Comments
 (0)