This is probably a dumb question, but what's the best way to check if a handle is empty? This comes up, for example, when replacing code of the type
Node* node = nullptr;
// do some stuff
if (node != nullptr) {
// more stuff
}
Obviously, I can do the same thing with a handle_t*, but that's pretty ugly. I'd rather use handle_t directly. Is there a way to do this?
This is probably a dumb question, but what's the best way to check if a handle is empty? This comes up, for example, when replacing code of the type
Obviously, I can do the same thing with a
handle_t*, but that's pretty ugly. I'd rather usehandle_tdirectly. Is there a way to do this?