Skip to content

Commit 3f73d1a

Browse files
committed
Address reviewers comments
1 parent 6fcd783 commit 3f73d1a

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

libcxx/include/__memory/allocation_guard.h

+3-3
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

+1-5
Original file line numberDiff line numberDiff line change
@@ -347,9 +347,7 @@ private:
347347
_ALIGNAS_TYPE(_Tp) char __buffer_[sizeof(_Tp)];
348348

349349
public:
350-
_LIBCPP_CONSTEXPR_SINCE_CXX26 _LIBCPP_HIDE_FROM_ABI _Tp& __get_value() {
351-
return *std::__launder(reinterpret_cast<_Tp*>(&__buffer_));
352-
}
350+
_LIBCPP_HIDE_FROM_ABI _Tp& __get_value() { return *std::__launder(reinterpret_cast<_Tp*>(&__buffer_)); }
353351
# endif
354352

355353
_LIBCPP_CONSTEXPR_SINCE_CXX26 _LIBCPP_HIDE_FROM_ABI explicit __forward_list_node(_NodePtr __next) : _Base(__next) {}
@@ -1219,7 +1217,6 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, size_type __n, const
12191217
__last->__next_ = __r->__next_;
12201218
__r->__next_ = __first;
12211219
__r = __forward_node_traits<__node_pointer>::__as_iter_node(__last);
1222-
// __r = static_cast<__begin_node_pointer>(__last);
12231220
}
12241221
return iterator(__r);
12251222
}
@@ -1261,7 +1258,6 @@ forward_list<_Tp, _Alloc>::__insert_after_with_sentinel(const_iterator __p, _Inp
12611258
__last->__next_ = __r->__next_;
12621259
__r->__next_ = __first;
12631260
__r = __forward_node_traits<__node_pointer>::__as_iter_node(__last);
1264-
// __r = static_cast<__begin_node_pointer>(__last);
12651261
}
12661262

12671263
return iterator(__r);

0 commit comments

Comments
 (0)