Skip to content

SonarCloud static analysis warning: Is it correct? #74

@matthew-wozniczka

Description

@matthew-wozniczka

contained.construct_value( std::move( value ) );

I'm getting a warning for the following line: "std::move" shouldn't be called on a forwarding reference. Replace it with "std::forward"

Is this actually a problem? I'm guessing it's not, because the other overload of initialize will get used for l-value references, so any calls to this one would have to be for r-value references? Is that right?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions