Skip to content

[C++] Add Status::OrElse #46791

Description

@pitrou

Describe the enhancement requested

In #46711 (comment) it was mentioned that the macro RETURN_NOT_OK_ELSE is confusing and can easily be misunderstood.

Adding a Status::OrElse method that calls a functor on error would decouple both concerns, allowing more flexible idioms with Status.

Component(s)

C++

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions