Skip to content

Commit

Permalink
fixed deque
Browse files Browse the repository at this point in the history
  • Loading branch information
MrShinshi authored Jul 15, 2024
1 parent 545552c commit 6d07e65
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/fast_io_dsal/impl/deque.h
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ class deque
grow_back();
}
auto currptr{controller.back_block.curr_ptr};
if constexpr (::std::is_trivially_constructible_v<value_type>)
if constexpr (!::std::is_trivially_constructible_v<value_type>)
{
::std::construct_at(currptr, ::std::forward<Args>(args)...);
}
Expand Down Expand Up @@ -794,7 +794,7 @@ class deque

constexpr void pop_back_unchecked() noexcept
{
if constexpr (::std::is_trivially_destructible_v<value_type>)
if constexpr (!::std::is_trivially_destructible_v<value_type>)
{
::std::destroy_at(controller.back_block.curr_ptr - 1);
}
Expand Down Expand Up @@ -871,7 +871,7 @@ class deque

constexpr void pop_front_unchecked() noexcept
{
if constexpr (::std::is_trivially_destructible_v<value_type>)
if constexpr (!::std::is_trivially_destructible_v<value_type>)
{
::std::destroy_at(controller.front_block.curr_ptr);
}
Expand Down

0 comments on commit 6d07e65

Please sign in to comment.