6 ms·
You wouldn't get on HN with that :-) It might be more useful in cases where you want to have multiple callbacks, and don't know how many at compile time. I wou
by Someone 13y ago
You wouldn't get on HN with that :-)
It might be more useful in cases where you want to have multiple callbacks, and don't know how many at compile time. I would still try and avoid it, though.
(And aside, I would make global_ptr static. That makes it invisible from outside its compilation unit. Even more pedantic: callback should be a void function)