Skip to content

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

@pitrou

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++

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions