Skip to content

bugprone-use-after-move should catch std::optional::has_value #114811

@higher-performance

Description

@higher-performance

Per #114255 (comment), std::optional::has_value should probably be considered bug-prone after a move, since it implies the use of std::optional::value afterward, which is moved-from.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions