Skip to content

map_or Documentation should note that the arguments are eagerly evaluated #68866

Closed
@ShaneLillieRAD

Description

@ShaneLillieRAD

Apologies if this isn't the appropriate repo to raise this issue on, I can close and re-create it wherever would be more appropriate.

It's a small thing, but in the documentation for both std::result::Result and std::option::Option it's noted that the *_or arguments are eagerly evaluated (with a suggestion to use the *_or_else for lazy evaluation) everywhere except for map_or. The behavior isn't super obvious up front if you're unfamiliar with that fact, but is very much important to know, so it would be nice if they were all consistent in that.

This issue has been assigned to @tom-a-wagner via this comment.

Metadata

Metadata

Assignees

Labels

A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions