Skip to content

Commit

Permalink
Revert "reference: Revert a previous change"
Browse files Browse the repository at this point in the history
This reverts commit 2311ca3.
  • Loading branch information
lhmouse committed Oct 23, 2023
1 parent 2311ca3 commit ab296b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions asteria/runtime/reference.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ class Reference
m_xref(::rocket::exchange(other.m_xref))
{
if(this->m_xref == xref_temporary)
this->m_value = ::std::move(other.m_value);
this->m_value.swap(other.m_value);
}

Reference&
operator=(Reference&& other) & noexcept
{
if(other.m_xref == xref_temporary)
this->m_value = ::std::move(other.m_value);
this->m_value.swap(other.m_value);
else if(other.m_xref == xref_variable)
this->m_var.swap(other.m_var);
else if(other.m_xref == xref_ptc)
Expand Down

0 comments on commit ab296b8

Please sign in to comment.