Skip to content

Commit

Permalink
Reset index after move construction
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanxingyang committed Jan 16, 2025
1 parent f33d582 commit 181c48d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions iceoryx_hoofs/vocabulary/include/iox/detail/variant.inl
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ inline constexpr variant<Types...>::variant(variant&& rhs) noexcept
if (m_type_index != INVALID_VARIANT_INDEX)
{
internal::call_at_index<0, Types...>::moveConstructor(m_type_index, &rhs.m_storage, &m_storage);
rhs.m_type_index = INVALID_VARIANT_INDEX;
}
}

Expand Down

0 comments on commit 181c48d

Please sign in to comment.