forked from OSchip/llvm-project
[libc++] Change forward_list::swap to use propagate_on_container_swap for noexcept specification
The current implementation of `std::forward_list::swap` uses `propagate_on_container_move_assignment` for `noexcept` specification. This patch changes it to use `propagate_on_container_swap`, as it should. Fixes https://llvm.org/PR50224. Differential Revision: https://reviews.llvm.org/D101899
This commit is contained in:
parent
78d404a11d
commit
7adf713a5e
|
@ -534,7 +534,7 @@ public:
|
|||
#if _LIBCPP_STD_VER >= 14
|
||||
_NOEXCEPT;
|
||||
#else
|
||||
_NOEXCEPT_(!__node_traits::propagate_on_container_move_assignment::value ||
|
||||
_NOEXCEPT_(!__node_traits::propagate_on_container_swap::value ||
|
||||
__is_nothrow_swappable<__node_allocator>::value);
|
||||
#endif
|
||||
protected:
|
||||
|
@ -599,7 +599,7 @@ __forward_list_base<_Tp, _Alloc>::swap(__forward_list_base& __x)
|
|||
#if _LIBCPP_STD_VER >= 14
|
||||
_NOEXCEPT
|
||||
#else
|
||||
_NOEXCEPT_(!__node_traits::propagate_on_container_move_assignment::value ||
|
||||
_NOEXCEPT_(!__node_traits::propagate_on_container_swap::value ||
|
||||
__is_nothrow_swappable<__node_allocator>::value)
|
||||
#endif
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue