Skip to content

Empty handle #22

@glennhickey

Description

@glennhickey

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions