Skip to content

[std.algorithm.mutation.move] Incorrect documentation #10956

@ichordev

Description

@ichordev

std.algorithm.mutation.move's documentation says this:

Preconditions
If source has internal pointers that point to itself and doesn't define opPostMove, it cannot be moved, and will trigger an assertion failure.

This mechanism has been commented out for years (what is opPostMove even? A D1 feature?), and may give users of this function a false sense of security. This documentation is also mirrored here:
https://dlang.org/phobos/core_lifetime.html#.move

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions