Skip to content

[C++] GCC complains about redundant move #38889

@MrJia1997

Description

@MrJia1997

Describe the bug, including details regarding any error messages, version, and platform.

OS: Ubuntu 22.04
GCC: 11.4.0

GCC complains about redundant move when -Wall, -Wextra, and -Werror are enabled, on the following line for example. Does anybody have the same issue?

return std::move(out);

Component(s)

C++

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