3 ms·
So... other than using std::function and other than something in Qt, what would be a more efficient C++[11,17] native way of doing a callback?
by stargrazer 7y ago
So... other than using std::function and other than something in Qt, what would be a more efficient C++[11,17] native way of doing a callback?
- Elv13 7y agoGoing from "more efficient" to "most". That would be the assembly `asm("JMP *%eax")` instruction or something like it.
- int_19h 7y agoThat would be the assembly way of doing a callback, not a C++ way.
- jcelerier 7y agohttps://stackoverflow.com/questions/4298408/5-years-later-is-there-something-better-than-the-fastest-possible-c-delegate https://stackoverflow.com/questions/4298408/5-years-later-is... ; you loose some flexibility though.