Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Generate error when static_callable's object is trivially moveable #66

Open
kammce opened this issue Jul 18, 2023 · 0 comments
Open

Generate error when static_callable's object is trivially moveable #66

kammce opened this issue Jul 18, 2023 · 0 comments
Labels
🐛 bug Something isn't working

Comments

@kammce
Copy link
Contributor

kammce commented Jul 18, 2023

Typically, drivers will use a lambda that captures this when using static_callable. When the object is moved, this points to invalid memory. The move constructor should do the work of reestablishing the interrupt to point to the new location. At this moment, this operation is not trivial and must be done manually for each platform driver that utilizes interrupts/static callable, unfortunately.

https://en.cppreference.com/w/cpp/types/is_move_constructible
https://en.cppreference.com/w/cpp/types/is_move_assignable

@kammce kammce added the 🐛 bug Something isn't working label Jul 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant