Remove usage of hal::move_interceptor for hal::can_router. The major issue with hal::move_interceptor is that it results in an exact clone between both objects. There is no way for either object to know its a "moved-from" object and thus when they destruct or are destroyed, they end up disabling both objects as they have common resources.
Move constructor for hal::can_router now reassigns the can receive handler to the new object and sets the pointer to the can peripheral on the moved-from object is set to nullptr to differentiate between objects.
Move constructor for hal::static_list makes the moved-from empty and also moves all of the list item from the moved-from list to the new list.
Remove usage of hal::move_interceptor for
hal::can_router
. The major issue with hal::move_interceptor is that it results in an exact clone between both objects. There is no way for either object to know its a "moved-from" object and thus when they destruct or are destroyed, they end up disabling both objects as they have common resources.Move constructor for
hal::can_router
now reassigns the can receive handler to the new object and sets the pointer to the can peripheral on the moved-from object is set tonullptr
to differentiate between objects.Move constructor for
hal::static_list
makes the moved-from empty and also moves all of the list item from the moved-from list to the new list.